Pretty prompt

Philip Yzarn de Louraille yzarn at lhdsy1.chevron.com
Sun Jun 16 15:41:25 AEST 1991


In article <1991Jun13.163726.10604 at umiami.ir.miami.edu> rfrost at umiami.ir.miami.edu writes:
>How do I get a prompt which will always show the current directory.
>For example:
>
>     /usr/rfrost>

On Ultrix, and using the csh, I use:

set prompt="`echo $cwd`>"
alias cd      cd \!\* \; set prompt='"`echo $cwd`>"'
alias pushd   pushd \!\* \; set prompt='"`echo $cwd`>"'
alias popd    popd \!\* \; set prompt='"`echo $cwd`>"'
You could replace echo $cwd by pwd, but it is slower and won't always
show you what you want, especially if you have directories that have
symbolic links to somewhere else.
-- 
  Philip Yzarn de Louraille                 Internet: yzarn at chevron.com
  Research Support Division                 Unix & Open Systems
  Chevron Information & Technology Co.      Tel: (213) 694-9232
  P.O. Box 446, La Habra, CA 90633-0446     Fax: (213) 694-7709



More information about the Comp.unix.ultrix mailing list