On Tue, 26 Jun 2018, Amadeusz Sławiński wrote: > OK, I think I may be bit confused about what you are trying to do here. > If you want to set title based on what you just started in shell it's > possible right now... > http://web.mit.edu/gnu/doc/html/screen_9.html#SEC37 > http://aperiodic.net/screen/title_examples > or just search for "gnu screen set window title bash" (or some other > shell)
Let's leave xterm window titles to a side for a moment; I, for one, don't use them - because I dislike heavily customized shell prompts everywhere and when I don't do that -- the programs that do set xterm title leave a mess there. I also don't have a hard status line, I invoke the window list by pressing ^A W manually. I think what Chris wants is some sensible tracking of the "current interactive process" on a tty. I think tmux does something similar to this. That could ba further expansion of the "%T" idea. Some tmux-related discussion: https://superuser.com/questions/879349/tmux-detect-which-process-runs-in-the-active-pane https://superuser.com/questions/827176/what-does-the-first-pid-of-a-pane-in-tmux-mean While it could be possible to detect the last process running in a screen window, I don't know if it is possible to sensibly detect the "man | less" case to prefer "man". In some cases, the last process in the pipeline will be what the user wants to recognize the context. Marcin
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ screen-users mailing list screen-users@gnu.org https://lists.gnu.org/mailman/listinfo/screen-users