ksh prompt
aaron.l.hoffmeyer
noraa at cbnewsk.att.com
Fri Mar 8 11:11:10 AEST 1991
In article <7365 at mentor.cc.purdue.edu> asg at sage.cc.purdue.edu (The Grand Master) writes:
>The $PWD variable changes when you cd.
>ksh provides for another eval of the prompt string before printing it,
>so all you have to do is quote the $ in $PWD like this:
>PS1="\$PWD ->"
>this will give you a prompt that includes the current directory and
>is dynamic
> Bruce
OK. That's solved. Now -> I like to have my p[rompt in reverse video
(and in distinct colors when I am working on a terminal with those
capabilities). Anyway, for the terminal I use the most, this is my PS1
definition:
export PS1=`print - "\`tput smso\`\`tput blink\` ${SYSNAME}-> \`tput sgr0\` "`
How do I get the \$PWD in my PS1 definition to be printed in reverse
video?
Aaron L. Hoffmeyer
TR at CBNEA.ATT.COM
More information about the Comp.unix.shell
mailing list