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

Re: Prompt in Bash



On Sat, 6 Sep 1997, Lawrence wrote:

> Is it possible to do it in tcsh?
> 

Yes, this is from the O'Reilly book "Using csh & tcsh".  I use this at
work on SunOS 4.1.4 running tcsh.  There are two files involved, your
.cshrc (or .tchsrc) and another little file ~/.settitle.

===== .cshrc ======

#-------------------------------------------------------------
#
# Set prompt display
#
#-------------------------------------------------------------

if (xterm =~ $TERM) then
    source ~/.settitle
    set prompt = "%~ % "
else
    alias setprompt 'set prompt = "%~ % "'
    setprompt
    alias cd 'cd \!*;setprompt'
    alias pushd 'pushd \!*;setprompt'
    alias popd  'popd \!*; setprompt'
endif


==== ~/.settitle  ======

#
# .settitle - display path location in xterm title bar
#

alias settitle 'echo -n "2;$cwdttitle
alias cd 'cd \!*;settitle'
alias pushd 'pushd \!*;settitle'
alias popd 'popd \!*;settitle'



======================================================================
Steve Witt                                    mailto:witt@pairgain.com
PairGain Technologies, Inc.                          (714) 730-3245


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: