Closed GoogleCodeExporter closed 9 years ago
It's this bit in your PS1 setting that does this:
\033]0;\007
Original comment by andy.koppe
on 16 Jul 2011 at 3:40
Thank you, now i see the title of the window(-bash).
But...
Can the title be dynamic, reflecting the process in execution?
Really thanks for the very quick time you responded!!!
Alessandro
Original comment by alessand...@gmail.com
on 16 Jul 2011 at 4:10
This is a bash question rather than a mintty one, but here goes. It can be done
using bash's "debug trap" functionality. A simple-minded solution looks like
this:
trap 'echo -ne "\e]0;$BASH_COMMAND\a"' debug
That has a problem though: backslash sequences in the command get expanded and
control characters are passed straight through, both of which can mess up the
title and have other "interesting" side effects. Hence a slightly more complex
solution is needed, for example:
trap 'echo -ne "\e]0;"; echo -nE "$BASH_COMMAND" | cat -t; echo -ne "\a"' debug
Original comment by andy.koppe
on 16 Jul 2011 at 7:43
Thanks again, Andy, but this time I think your advices are too much hard to be
understood by me ... I don't imagine where I could insert the intriguing
strings you suggest.
Alessandro
Original comment by alessand...@gmail.com
on 17 Jul 2011 at 1:26
The command can go into a bash startup file of your choice. See the manpages
for bash, echo, and cat for the meaning of it. Please send further questions to
the mintty discussion group or other appropriate forums.
Original comment by andy.koppe
on 18 Jul 2011 at 7:12
Original issue reported on code.google.com by
alessand...@gmail.com
on 16 Jul 2011 at 1:52Attachments: