This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: how to change the window title dynamically
- From: Eric Blake <ebb9 at byu dot net>
- To: lin q <linq936 at hotmail dot com>
- Cc: cygwin at cygwin dot com
- Date: Thu, 26 May 2005 18:40:53 -0600
- Subject: Re: how to change the window title dynamically
- References: <BAY10-F2FB4287A85BB532D01AEEE90F0@phx.gbl>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to lin q on 5/26/2005 4:19 PM:
> Hi,
> I wonder how to change the window title synamically like command prompt
> to list the full path? Google returns me such command,
>
> print -nP -u2 "\033]0;%n@%m:%~\a"
Try echo or printf, and try `help echo', `/bin/echo --help', and so forth,
for more of their options. For example, echo -e '\E]0;blah\a' changed my
window title to 'blah'. \033 is universally accepted as ESC, but you will
see that some programs allow the shortcut \E or ^[. If you want the
prompt to change the window title automatically, look at how /etc/profile
(or /etc/default/etc/profile) is manipulating $PS1 to get that effect.
- --
Life is short - so eat dessert first!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFClmyU84KuGfSFAYARAqAfAKCc1y9KFFNCvNqQOd6Od1WCNmUUrQCdHkNt
7BQ7U8T4mFLf8mJqdr0wipI=
=P9YO
-----END PGP SIGNATURE-----
--
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/