Prompt showing current directory (just like DOS)
Keith Packard
keith at motel6.UUCP
Fri Nov 29 06:38:01 AEST 1985
In article <159 at pyuxv.UUCP> you write:
>The following little script allows you to do the same thing
>in the Korn shell ("ksh")
>
>
> function ncd {
> alias cd=cd
> cd $1
> PS1="! $PWD >"
> alias cd=ncd
> }
> alias cd=ncd
> PS1=$PWD
>
It's far better to simply enclose cd in single quotes - the alias
will not be expanded so you don't need those other two aliases:
function ncd {
'cd' $*
PS1="! $PWD >"
}
alias cd=ncd
keith packard
tektronix!reed!motel6!keith
More information about the Comp.unix.wizards
mailing list