On 28 September 2010 04:45, SJ Wright wrote: > From what I've read so far, though, it appears that with bash > I've backed the wrong horse, so far as getting the running process name in > the title bar goes. The name of the shell is called by /s, I found out. I > still wonder why Bourne (or his 'successors') didn't think a blind 'ps > -head1' was worth setting an escape character for?
Because it would be no use at the time the prompt is printed: after the last command. You can use the trap builtin with the faux 'DEBUG' signal though to execute a command just before a command is executed, and $BASH_COMMAND will tell you what that command is. Here's one way to put this to use: trap 'printf "\e]0;%s\a" "$BASH_COMMAND"' DEBUG Andy -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple