bash doesn't allow arguments in aliases; the man page advises to use
functions. problem.
cd()
{
cd $1
xttitle `pwd`
}
this is actually an infinite loop. i'd much prefer to use "cd" rather than
a homebrewed function to change directories
begin: William Kendrick <[EMAIL PROTECTED]> quote
> On Sat, Oct 20, 2001 at 10:03:56AM -0700, Peter Jay Salzman wrote:
> > i've seen people with xterms that have $PWD as the xterm title.
> >
> > anyone know how to do this?
>
> In TCSH on my box here at home, I have this:
>
> switch ( $term )
> case xterm:
> alias cd 'chdir \!*;xttitle $cwd'
> breaksw
> default:
> breaksw
> endsw
>
>
> So in other words, when I run the command "cd", it not only cd's (chdir),
> but it also sets the xterm's title (using a small program I found called
> "xttitle") to the directory we ended up in.
>
> (I also run "xttitle" on its own sometimes, when I've got lots and lots
> of Xterms open, and am vi'ing certain files or runnother other processes,
> because "Gnome Terminal" or "/some/particular/path", aren't very meaningful
> in my taskbar. :) I usually set up an alias to "xttitle" called ",", so
> I can type it really quickly: ", makefile" or ", mysql-production")
>
>
> xttitle can be found here:
>
> http://www.jarvis.com/xttitle/
>
>
> Seems you can also do this even more easily using an "echo" :)
>
>
> xtitle() { echo "ESC]0;$*^G" } # title an xterm
>
> (where "ESC" and "^G" are literally those characters)
> (this is from Sonic.net's /etc/bashrc, btw)
>
>
> Anyway, enjoy! Gotta run!
>
> -bill!
--
"You may not use the Software in connection with any site that disparages
Microsoft, MSN, MSNBC, Expedia, or their products or services ..."
-- Clause from license for FrontPage 2002