[comp.unix.questions] PWD in Prompt that works!

jep@tlxprs.UUCP (Jo Poplawski) (02/23/88)

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@tlxprs.UUCP        | Disclaimer: If no one  |
Systems Support					     | around here takes me   |
Telexpress Inc.					     | seriously, should you? |
-------------------------------------------------------------------------------