ksh prompt

PrehnRL rlp at druwa.ATT.COM
Fri Mar 15 01:55:58 AEST 1991


In article <1991Mar12.180408.26450 at nijmeg>, clercqm at nijmeg (Marien de Clercq) writes:
> noraa at cbnewsk.cb.att.com (aaron.l.hoffmeyer) writes:
> 
> >Thanks to Ihor Kinal, I've set PS1 so that it prints in reverse video on
> >my terminal.  This is what I have in my .profile:
> 
> >           export RMSO=`tput rmso`
> >           export SMSO=`tput smso`
> >           export PS1='${SMSO}${SYSNAME} ${PWD#HOME/}-> ${RMSO} '
> 
> I don't know if you use the environment variables RMSO and SMSO again at 
> other places, but if you don't, why bother defining them if you could the 
> same with:
> 
>            PS1=`tput smso`'${SYSNAME} ${PWD#HOME/}-> '`tput rmso`
> 
> Marien de Clercq
> 
I use RMSO SMSO variables for ${PS2} ${PS3} ${PS4} and numerous shell scripts
& make files.  Setting these variables eliminates 2 calls to tput every time
I want something in Stand-out mode.

For prompts I normally use "${SMSO}[${SYSNAME} ${LOGNAME}]${RMSO} " with the
current directory shown on the status line or window label area.  PS[234] are
variations of PS1.  When executing vi, the status line/label changes to:
"${PWD} VI ${*}", upon returning from vi, the current directory is then
redisplayed on the status line/label.  Similar manipulations are done when
executing rlogin, telnet, ftp or su.  It makes it a lot easier to deal with
multiple windows on several terminals.


 Robert Prehn      +-----------------------------------------------------------+
 AT&T Bell Labs    |     ____   _______   _____   _______                      |
 Room  1F50        |    / __ \ |__   __| /   _ \ |__   __|                     |
 11900 North Pecos |   | <__> |   | |    \  \ \_\   | |                        |
 Denver, Co  80234 |   |  __  |   | |    /   \ __   | |    THE           CHOICE|
        	   |   | |  | |   | |   |  (\ / /   | |                        |
 druwa!rlp         |   |_|  |_|   |_|    \_____/    |_|                        |
 (303) 538-4554    |                                                           |
                   +-----------------------------------------------------------+



More information about the Comp.unix.shell mailing list