Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!ncar!unmvax!uokmax!occrsh!fang!att!drutx!druwa!rlp From: rlp@druwa.ATT.COM (PrehnRL) Newsgroups: comp.unix.shell Subject: Re: ksh prompt Summary: Other uses of $RMSO $SMSO Message-ID: <7839@drutx.ATT.COM> Date: 14 Mar 91 15:55:58 GMT References: <1991Mar8.234706.15343@cbnewsk.att.com> <1991Mar12.180408.26450@nijmeg> Sender: news@drutx.ATT.COM Lines: 40 In article <1991Mar12.180408.26450@nijmeg>, clercqm@nijmeg (Marien de Clercq) writes: > noraa@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 | | +-----------------------------------------------------------+