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: Naming Cygwin Shells


> 
> Simple question here. I am trying to figure out a way to name a cygwin shell
> so that I can have multiple windows up doing tails and other such functions
> and easily see what system i am looking at. 

See the section on PROMPTING (and also the PROMPT_COMMAND variable) in the
bash manual for general information about what you can put in your bash
prompt.  To make some of that information go up into the window title, precede
it by the magic incantation '\[\033]0;\]' and follow it by '\[\007\]'.  I
can't remember where I learned this information.  For example,

start_window_title='\[\033]0;\]'
end_window_title='\[\007\]'
PS1="${start_window_title}\w${end_window_title}\$"

would give you the current working directory (\w) in the title bar.

I'm not sure how you'd get the name of the command that's currently executing
into the title bar, but it probably could be done.

Good luck,
Andrew.


--
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]