Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!spool.mu.edu!uunet!lhdsy1!yzarn From: yzarn@lhdsy1.chevron.com (Philip Yzarn de Louraille) Newsgroups: comp.unix.ultrix Subject: Re: Pretty prompt Message-ID: <962@lhdsy1.chevron.com> Date: 16 Jun 91 05:41:25 GMT References: <1991Jun13.163726.10604@umiami.ir.miami.edu> Organization: Chevron Oil Field Research, La Habra, CA. Lines: 20 In article <1991Jun13.163726.10604@umiami.ir.miami.edu> rfrost@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@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