Current directory in the ksh prompt?

Mike Mills sam at ms.uky.edu
Wed May 1 02:17:42 AEST 1991


mju at 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 at ms.uky.edu, {rutgers, uunet}!ukma!sam
--University of Kentucky                  mike at ukpr.uky.edu    
--(606) 255-3583, 257-3092 
    "Drawing on my fine command of language, I said nothing." -- Mark Twain



More information about the Comp.unix.shell mailing list