PS1 change (ksh)
BALDWIN
mike at whuxl.UUCP
Thu Mar 21 17:04:47 AEST 1985
If you want the cwd in the prompt, just make a new function called, say, ch:
ch()
{
if cd $1
then PS1="[`pwd`] "
fi
}
This will work in SVR2 sh as well as ksh. I see no reason why the shell
has to be modified at all. We don't need to add any extra baggage to the
shell. For instance, why is there $PWD in ksh and $cwd in csh? Doesn't
`pwd` do the same without adding another funny variable to the shell?
Michael Baldwin
AT&T Bell Labs
harpo!whuxl!mike
More information about the Comp.unix.wizards
mailing list