current pwd in prompt
rjd at occrsh.ATT.COM
rjd at occrsh.ATT.COM
Wed Feb 10 03:32:00 AEST 1988
>Can anyone explain to me how to get my prompt to be the current directory? I
>have tried several methods without any success. It seems that no matter what
>method I try, the prompt is evaluated once and never changes.
>
>Just in case it matters, I am on an AT&T 3B2/400 running korn shell under UNIX
>System V.3.1.
>
>Thanks,
> Dave Mensing
Well, since we just went through this in one of the groups I read (this one?),
and I am also running ksh for my login, this was the method that I liked the
best. Put into your .profile (or the file that ENV is set to):
c() {
cd $*
PS1="${PWD}: "
}
And use "c <dirname>" to change directories.
Randy
More information about the Comp.unix.wizards
mailing list