There are multiple questions about this sprinkled around the network, but what I could find has one of two things in common:
- They give the manual solution, which only prints the current running program (with no arguments)
- The use zsh preexec feature (though I am not sure how that interacts with screen). I am looking for a Bash solution.
How do I get my screen title to show the entire command run, so if I run 3 long running Python scripts for example, I can see the script names in the title as well? For bonus points, if I can get this to keep displaying the last command run that would be even better.
My current setup:
PROMPT_COMMAND='/bin/echo -ne "\033k\033\0134"'
- Adding stuff between
\033- breaks with
- Using trap debug to set an external additional title since for XTERM with no screen I know the solution. This breaks badly with the
and variations of the above. I want a solution to be through screen, so both the window title and the screen window list show the full command.
As a bonus, I would really like it if Screen interacts nicely with Vim, so changing buffers/opening new files/etc. would dynamically updated in the screen title.