This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PS1 overwrites attempt to change title, settitle in bash or rxvt title


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]