This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: spaces in title of mintty command
> > mintty -t "one two" result: no title
> > mintty -t 'one two' result: no title
>
> Works fine for me. Please note that bash's default prompt (i.e. the
> PS1 variable) sets the terminal title to the current working
> directory, thus overwriting anything you set with the -t option.
Ok, that took some effort, but I have it working.
Registry key:
C:\cygwin\bin\mintty -e /bin/bash --login
PS1:
PS1='\[\e]0;$(pwd)\a\]\n\[\e[32m\]$(pwd)\[\e[0m\]\n\! \$ '
I played with the default prompt to understand how it got the titlebar working because mine didnât. I figured out which part does it:
\[\e]0;$(pwd)\a\]\n
Where:
\[\e]0; starts it
And:
\a\]\n ends it
And everything in between:
$(pwd) is the title
But I couldn't find references to those character sequences anywhere. Could you explain what they mean?
Thanks,
-Kevin