Prompt showing current directory (just like DOS)
Craig Miller
dcm at busch.UUCP
Sat Nov 30 00:14:55 AEST 1985
In article <159 at pyuxv.UUCP> cim2 at pyuxv.UUCP (Robert L. Fair) writes:
>
> function ncd {
> alias cd=cd
> cd $1
> PS1="! $PWD >"
> alias cd=ncd
> }
> alias cd=ncd
> PS1=$PWD
Another neat thing about ksh is that it checks the PS1 variable
for $var stuff before it prints it out. So, the same thing could
be implemented like this:
PS1="! \$PWD >"
(notice that the backslash is needed...)
>Robert L. Fair
>Bell Communications Research/ C.H.C
>Piscataway
>N.J.
>(pyuxv!cim2)
--
Craig Miller
UUCP: ..!ihnp4!we53!busch!dcm
The Anheuser-Busch Companies; St. Louis, Mo.
- Since I'm a consultant here and not an Anheuser-Busch employee, my
views (or lack of) are strictly my own.
More information about the Comp.unix.wizards
mailing list