GNU screen: environment variables

[Updated] Question related to GNU Screen questions : programmers cite in Readbuf and GNU Screen: files for numbered buffers? . Since they are not resolved, the question asks a more general concept of environment variables. I am convinced that they are the key to improving screen performance.

1. How to use Bash variables on the screen, for example:

$ export path=`pwd`
$ ^a :readbuf `echo $path`/debugging_code.php

2. How can I reuse screen buffers, for example:

$ ^a :readreg a `echo $path`
$ ^a :readbuf $a/debugging_code.php
$ ^a ]

3. How can I use Screen buffers, such as environment variables?

+2
source share
2 answers

, . :

$ screen -X setenv a "$PWD/debugging_code.php"

:

C-a :readbuf $a
+4

4.0.3, :

^A :readbuf !shell-command

. , popen , bufferfile ( ), , , . , , , , , , .

:

^A :readbuf !cat $HOME/projects/foobar/file.txt

, .

gnu-screen-readbuf-exec Github Git, .

+1

Source: https://habr.com/ru/post/1715810/


All Articles