Current directory in the ksh prompt?

Marc Unangst mju at mudos.ann-arbor.mi.us
Sun Apr 28 10:27:03 AEST 1991


I realize this is probably a FAQ, but I can't seem to find the FAQ
list on this machine or any of the NNTP servers around here (if you
know of an NNTP server that accepts connections from anybody and keeps
news a long time, like for over two weeks, please let me know!), so
I'll ask away...

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
can be done by aliasing the cd command to something that does the cd
and then re-sets your prompt, using `pwd` to get the new directory.
Unfortunately, it seems that you can't use the parameters inside an
alias like you can in csh, so this trick doesn't work.  Is there a
different trick for ksh, or am I just going to have to live with
typing "pwd" all the time?

--
Marc Unangst               |
mju at mudos.ann-arbor.mi.us  | "Bus error: passengers dumped"
...!hela!mudos!mju         | 



More information about the Comp.unix.shell mailing list