[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: jobname xterm title in bash?



On Wed, Aug 21, 2002 at 11:09:29AM +1000, Lucas Barbuto wrote:
> 
> I changed my ~/.bashrc to include nothing but
> 
> xtitle() { echo -ne "\\E]2\;$1\\a"; }
> trap 'xtitle "[$(history 1 | cut -b 8-38)]"' DEBUG

The problem was that those escape sequences didn't work for xterm or
rxvt -- but they worked for gnome-terminal, which I was using.

The following lines work for xterm, rxvt, aterm, and gnome-terminal:

  xtitle() { echo -ne "\033]0;$1 $USER@$HOSTNAME:$PWD\007"; }
  trap 'xtitle "[$(history 1 | cut -b 8-30)]"' DEBUG

Sorry for the confusion.

-- 
 .~.
 /V\   Lance Simmons
/( )\  lance@lsimmons.net
^^-^^



Reply to: