From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,1d3d704021ddfe52 X-Google-Attributes: gidfee84,public From: mortimer@physics.uq.oz.au (Ian Mortimer) Subject: Re: Need to display $PWD in prompt using /bin/ksh Date: 1996/12/09 Message-ID: <58fmmu$da1$1@nargun.cc.uq.oz.au>#1/1 X-Deja-AN: 203054099 references: <57tlut$3oc$1@nargun.cc.uq.oz.au> <58adac$a31@news.ecn.bgu.edu> organization: University of Queensland newsgroups: comp.unix.osf.osf1 system PRIVILEGED account (root) wrote: > mortimer@physics.uq.oz.au (Ian Mortimer) wrote: > >clos@ivory.trentu.ca wrote: > > > > > >> We are using Korn shell (/bin/ksh) and I would like to have the shell display my > >> present working directory ($PWD) in my command prompt evertime I "cd" to a > >> different directory. > > > >I put this in my .profile: > > > > PS1='${PWD#$HOME/}> ' > > > >This gives me a prompt showing the current directory in relation > >to my home directory. > > > >Ian > It does not work !!!!!!!! It works for me. Is HOME defined? Did you use single quotes? If you use double quotes you need to escape at least the first $ with a \. Are you using ksh? This won't work with other shells. Ian