This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: PS1 overwrites attempt to change title, settitle in bash or rxvt title
- From: "John Morrison" <john dot r dot morrison at ntlworld dot com>
- To: bnelson at austin dot ibm dot com
- Cc: cygwin at cygwin dot com
- Date: Mon, 6 Sep 2004 18:00:56 +0100 (BST)
- Subject: Re: PS1 overwrites attempt to change title, settitle in bash or rxvt title
- References: <200409061612.i86GCTJ31324@vignette.austin.ibm.com>
Hi Brian,
Patches gladly evaluated ;)
J.
>
> This message is more for just getting into the archives to help any
> newbies like me in the future. I was trying to set the title of my cygwin
> and rxvt windows and was not having any luck. I followed the instructions
> to echo something like:
>
> echo -e "\033]2;New Title\007"
>
> but it never seemed to work. It would only show the default cygwin title
> of the current path (/cygdrive/c/...). I was trying everything I could
> think of, then I changed PS1 to be something different and I could now set
> the title. It turns out the default PS1 in cygwin/etc/profile sets PS1 to
> include "\033]0;\w\007". That string is the terminal code to set the
> title. So anytime I did something to set the title, the evaulation of PS1
> would overwrite it. So anyone having a problem setting the title should
> look at their PS1 variable.
>
> (In case anyone doesn't know, PS1 is the shell environment variable which
> controls what your command prompt looks like.)
>
> Also, I saw references to use the settitle function found in the default
> bashrc (cygwin/etc/defaults/etc/skel). That didn't work because the
> characters in the function are exactly:
>
> echo -n "^[]2;$@^G^[]1;$@^G";
>
> Where the ^ are actual carat characters. That is, ^[ are the two
> characters 'carat' and '[' as opposed to the single character ESC. The
> same with ^G.
>
> -Brian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/