pwd in your PS1

Kirtikumar Satam satam at ecs.umass.edu
Fri Dec 29 20:41:22 AEST 1989


Inserting the following three aliases will help achieve the same
effect. Note that this is only for csh.
This part of code was once posted by someone in comp.unix.questions.

Also, if you want full path to be displyed, then change {cwd:t} to {cwd}.
The "\\!%" at the end is used to indicate the history command number.
cwd= predefined shell variable which gets set to the Current Working
Directory.

------------------------------------------------------------
alias cd 'chdir \!* && set prompt="${cwd:t}_\\!% "'
alias pushd 'pushd \!* && set prompt="${cwd:t}_\\!% "'
alias popd 'popd \!* && set prompt="${cwd:t}_\\!% "'
-------------------------------------------------------------

Hope this helps.
Thanks.
-satam
------------------------------------------------------------------------
Kirtikumar "Mumbaichaa" Satam
INTERNET : satam at ecs.umass.edu
BITNET : satam at umaecs.bitnet
217 Northwood Apts, Sunderland, MA 01375   Tel# 413-665-3222
------------------------------------------------------------------------



More information about the Comp.unix.wizards mailing list