PWD in Prompt that works!
Jo Poplawski
jep at tlxprs.UUCP
Tue Feb 23 03:04:48 AEST 1988
We are running UNIX V on a 3b2/310 and the Korn Shell and this is what I
have in my .kshrc for displaying the current directory and my prompt. They
are on seperate lines to keep them that way. $SYSNAME is a variable set in
my .profile to determine the system name and $SUBSHELL is my current shell
level.
I have been using this for a couple of months and it works beautifully. You
MUST make sure that the PS1 assignment is in ' and not " or it won't be
re-evaluated.
PS1='
[Directory: $PWD]
$SYSNAME:$SUBSHELL:! [root] # '
PS2="You need to enter more > "
-------------------------------------------------------------------------------
Jo Poplawski UUCP: jep at tlxprs.UUCP | Disclaimer: If no one |
Systems Support | around here takes me |
Telexpress Inc. | seriously, should you? |
-------------------------------------------------------------------------------
More information about the Comp.unix.questions
mailing list