Closed GoogleCodeExporter closed 8 years ago
As far as mintty is concerned, any string can be displayed in the window title.
This can be set either with the --title command line option or the relevant
xterm control sequence.
In the default Cygwin configuration, the working directory is put into the
title by bash's prompt setting, i.e. the PS1 variable:
$ echo $PS1
\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\]\n\$
The title setting bit is this: '\e]0;\w\a'. Bash expands the '\w' to the
current working directory. The sequence is enclosed by '\[' and '\]' to tell
bash that it shouldn't be counted towards the length of the prompt, otherwise
it gets confused about long lines.
See also:
http://www.davidpashley.com/articles/bash-prompts.html
http://www.davidpashley.com/articles/xterm-titles-with-bash.html
Original comment by andy.koppe
on 2 Nov 2010 at 12:17
Original issue reported on code.google.com by
roge...@gmail.com
on 2 Nov 2010 at 8:48