delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/05/26/20:41:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <42966C95.1030004@byu.net>
Date: Thu, 26 May 2005 18:40:53 -0600
From: Eric Blake <ebb9 AT byu DOT net>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
MIME-Version: 1.0
To: lin q <linq936 AT hotmail DOT com>
CC: cygwin AT cygwin DOT com
Subject: Re: how to change the window title dynamically
References: <BAY10-F2FB4287A85BB532D01AEEE90F0 AT phx DOT gbl>
In-Reply-To: <BAY10-F2FB4287A85BB532D01AEEE90F0@phx.gbl>
X-IsSubscribed: yes

-----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 AT byu DOT 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019