Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GNU Screen: programmer-quotes ` ` in Readbuf?

The commands need absolute paths in slurping. So I need programmer-quotes, because of laziness to write long paths. How can I use them like:

^a :readbuf `pwd`/file
like image 568
Léo Léopold Hertz 준영 Avatar asked Sep 19 '26 14:09

Léo Léopold Hertz 준영


1 Answers

Your question seems to assume that it is possible to use backticks in this way. However, screen does not appear to support backticks in the :readbuf command. It also does not support other shell conventions such as ~ for home directory, or $XYZ for environment variable expansions.

When screen reads the file named in the :readbuf command, the file name is relative to the current directory where screen started, not the current directory of whatever is displayed in the active window. This might be why you found that absolute paths worked for you. Try using a filename relative to whatever directory you started screen from originally.

Update: For additional work on this answer, see: GNU Screen: Environment variables

like image 116
Greg Hewgill Avatar answered Sep 26 '26 17:09

Greg Hewgill



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!