Re: csh is root's shell?

From: Ulf Zimmermann <ulf_at_Alameda.net>
Date: Thu, 7 Oct 2004 10:49:58 -0700
On Thu, Oct 07, 2004 at 09:44:52AM -0700, Don Lewis wrote:
> This is what I use:
> 
>         set prompt = '%m:%c4 %h%#'
>         if ($?TERM && $TERM == xterm) then
>                 set prompt='%{\033]0;%n_at_%m:%c5\007%}%m:%c %h%#'
>         endif
> 
> It adds the last few components of $cwd and the history event number to
> the prompt.  When running in an xterm, it puts the username, hostname,
> and the last part of $cwd in the xterm title.

A thing I use under tcsh is 'alias precmd echo -n "^[]2;$HOST^G"'
Bundled with an if statement and either excluding cons25 (you are
on the console) or only enabling it when $TERM is set to certain
terminals, it will print the current host into your window bar, like
under SecureCRT and xterm.

-- 
Regards, Ulf.

---------------------------------------------------------------------
Ulf Zimmermann, 1525 Pacific Ave., Alameda, CA-94501, #: 510-865-0204
You can find my resume at: http://seven.Alameda.net/~ulf/resume.html
Received on Thu Oct 07 2004 - 15:49:59 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:16 UTC