Newsgroups: comp.unix.shell
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!ukma!s.ms.uky.edu!sam
From: sam@ms.uky.edu (Mike Mills)
Subject: Re: Current directory in the ksh prompt?
Message-ID: <sam.673028262@s.ms.uky.edu>
Organization: University of Kentucky
References: <sN6311w164w@mudos.ann-arbor.mi.us> <kLF411w164w@mudos.ann-arbor.mi.us>
Date: Tue, 30 Apr 1991 16:17:42 GMT
Lines: 19

mju@mudos.ann-arbor.mi.us (Marc Unangst) writes:

>I wrote:
>> I recently started using ksh, and one thing I miss dearly from csh is
>> the ability to put the current directory in your prompt.  With csh, it
>[...]

Rather than a function, you can just do this:

PS1='${PWD##*/}<!>$ '

...this gives you the PWD with current history #, and a $ prompt...


-- 
--Mike Mills              E-Mail:  sam@ms.uky.edu, {rutgers, uunet}!ukma!sam
--University of Kentucky                  mike@ukpr.uky.edu    
--(606) 255-3583, 257-3092 
    "Drawing on my fine command of language, I said nothing." -- Mark Twain
