home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.aix
- Path: sparky!uunet!kithrup!hoptoad!decwrl!sdd.hp.com!usc!sol.ctr.columbia.edu!ira.uka.de!chx400!aragorn.unibe.ch!iacrs1!haedener
- From: haedener@iacrs1.unibe.ch (Konrad Haedener)
- Subject: Where are you?
- Message-ID: <1992Aug19.122848.18225@aragorn.unibe.ch>
- Keywords: PATH, ksh, CWD, prompt
- Sender: haedener@iacrs1 (Konrad Haedener)
- Reply-To: haedener@iacrs1.unibe.ch
- Organization: University of Berne
- Date: Wed, 19 Aug 1992 12:28:48 GMT
- Lines: 57
-
- If you: o usually work under aixterm
- o have problems tracking your CWD under ksh
- o don't want to waste half of each prompted line
- to display your CWD by fiddling with PS1
- then
- consider the following:
-
- o put "aixterm.statusLine: true"
- "aixterm.statusNormal: true"
- in your ~/.Xdefaults (or do anything similar to that effect)
-
- o put "ENV=$HOME/.kshrc"
- "export ENV"
- in your ~/.profile (or do anything similar to that effect)
-
- o create ~/.kshrc with the following (or similar) contents:
- ==== cut ====
- if [ $TERM = aixterm ] ; then
- BOLD="\033[1m"
- TSL="\033[?1T"
- FSL="\033[?F"
- EL="\033[K"
- SGR0="\033[0;10m"
- KCUU1="\033[A"
- HOST=`uname -n`
-
- cwd () {
- cd $*
- echo $TSL$EL"You are on "$HOST" in "$BOLD$PWD$SGR0$FSL$KCUU1
- }
- alias cd=cwd
- fi
-
- if [ $TERM = vt220 ] ; then
-
- cwd () {
- cd $*
- PS1=$PWD"> "
- export PS1
- }
- alias cd=cwd
- fi
-
- if [ $TERM = aixterm ] ; then
- cd .
- clear
- fi
- ==== cut ====
-
- You will get your hostname and current working directory displayed
- and tracked in the aixterm's status line (and PS1 usually left alone).
- Enjoy,
- --
- Konrad Haedener Phone: +41 31 65 42 25
- Institute for Physical Chemistry FAX: +41 31 65 44 99
- University of Berne
- Switzerland haedener@iacrs1.unibe.ch
-