[X-Unix] Call for bash prompts

David Ledger dledger at ivdcs.demon.co.uk
Sat Feb 21 23:22:04 PST 2004


>Subject: Re: [X-Unix] Call for bash prompts
>From: Kirk McElhearn <kirklists at wanadoo.fr>
>Message-ID: <BC5CD6E7.7E20F%kirklists at wanadoo.fr>
>
<snip>
>>
>>  Fiddling the title bar is also convenient because it allows you to use
>>  Terminal's Dock menu to jump straight to the window you want rather
>>  than guessing, which is important to me because I typically have 6-12
>>  windows open.
>
>Yes, I agree.
>
>I have been trying to reproduce something you can do in tcsh - you can put
>the actual command name in the title bar as well, but it doesn't seem that
>this is possible in bash.

I use a ksh function:
	xtitle()  { print -n " <Esc>]2;$*<Bell>"; }
where <Esc> is an Escape, and <Bell> is a ctrl-G.  It should convert to bash.

This lets me use:
	xtitle Any text I like including $variables
wherever I like to set an xterm head bar to whatever I want.  This 
also works with the Terminal as long as the correct header 
preferences are set.

David


-- 
David Ledger - Freelance Unix Sysadmin in the UK.
Chair of HPUX SysAdmin SIG of hpUG technical user group (www.hpug.org.uk)
dledger at ivdcs.co.uk (also dledger at ivdcs.demon.co.uk)
www.ivdcs.co.uk



More information about the X-Unix mailing list