Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!killer!jolnet!brendan From: brendan@jolnet.ORPK.IL.US (Brendan Kehoe) Newsgroups: comp.unix.questions Subject: Re: Getting UNIX prompt to display current directory Summary: one possibility Keywords: UNIX prompt directories pwd Message-ID: <304@jolnet.ORPK.IL.US> Date: 19 Mar 89 05:47:04 GMT References: <5582@ncsugn.ncsu.edu> Reply-To: brendan@jolnet.ORPK.IL.US (Brendan Kehoe) Distribution: usa Organization: Jolnet, Public Access Unix, Orland Park (Joliet), Ill. Lines: 25 In article <5582@ncsugn.ncsu.edu> fristens@ncsugn.ncsu.edu (Brian Fristensky) writes: > Can anyone think of a tricky way? My >guess is that it would involve getting pwd output into the shell variable >$PS1, but that would require somehow getting pwd to execute after each >command you type. I have this set up in my .kshrc file: PS1='${PWD##} $LOGNAME>' This will give you (for example): /usr/usr1/brendan brendan> as a prompt. It does *not* work in the Bourne shell..only Korn. >Brian Fristensky >Dept. of Botany >North Carolina State University > >nscugn!fristens@mcnc.uucp -- Brendan Kehoe brendan@cup.portal.com | GEnie: B.KEHOE | Oh no! I forgot to say goodbye brendan@chinet.chi.il.us | CI$: 71750,2501 | to my mind! brendan@jolnet.orpk.il.us | Galaxy: Brendan | - Abby Normal