[Pkg-zsh-devel] Bug#176626: screen: mini-curses type of interface for screen -r w/ multiple screens?
Axel Beckert
abe at debian.org
Sat Sep 3 15:09:26 UTC 2011
Hi Joshua,
On Mon, Jan 13, 2003 at 09:32:58PM -0800, Joshua M. Kwan wrote:
> When using multiple screens it is a chore to copy down the PIDs/socket
> names of each of the screens to resume them. For example:
>
> $ screen -r
> There are several suitable screens on:
> 5735.pts-3.kanoe (Detached)
> 5805.pts-3.kanoe (Detached)
> Type "screen [-d] -r [pid.]tty.host" to resume one of them.
>
> It's quite a pain in the butt to even copy this if in X, and then psate
> it later. Is there any way where I can just use my arrow keys to choose
> the screen i want to access instead of having to type in meaningless
> numbers? (i can use -sockname but i still have to type the PID)
There are two ways:
zsh, at least with grml's zshrc, allows proper tab completion for
screen sessions:
abe at c-crosser:~ % screen -r <Tab>
completing detached screen process
25983..c-crosser 26065..c-crosser
Pressing Tab several times switches between the offered completions.
The other option is the following small script which needs iselect
from the package of the same name:
screen -rd $(screen -ls | sed -e 's/[ \t][ \t]*/ /g;' | egrep '^ [0-9]' | sed -e 's/^ //' | iselect -a | awk -F. '{print $1}')
HTH, even if it's about 8 years later. :-)
Regards, Axel
--
,''`. | Axel Beckert <abe at debian.org>, http://people.debian.org/~abe/
: :' : | Debian Developer, ftp.ch.debian.org Admin
`. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
`- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5
More information about the Pkg-zsh-devel
mailing list