Current directory in the ksh prompt?

Odin Anderson odin at jomby.cs.wisc.edu
Tue Apr 30 12:14:29 AEST 1991


In article <kLF411w164w at mudos.ann-arbor.mi.us> 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
>[...]
>
>Well, I've gotten many replies to this question.  The general idea is
>to create a function called "_cd" (or something similar), which does
>the actual cd and then resets the prompt, and then alias cd to this
>function. 

Isn't the folowing more simple while still doing what you want:
	 PS1=" \$PWD> "
This works well for me (I like the whole path).  

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Sincerely,       + Programing is like _______, it must be _______ to be good.+
+     __             + What is the most stable 3-dimensional shape?            +
+    /  ) __/ . __     + How many bytes are in a mouthfull?                    +
+   (__/ (_<_<_/ <_      + Never, Never, Say never...                          +
+                          + Always carry a fingernail clipper!                +
+   odin at jomby.cs.wisc.edu   + Don't ask questions you already know.           +
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



More information about the Comp.unix.shell mailing list