home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / aix / 8921 < prev    next >
Encoding:
Text File  |  1992-08-19  |  1.8 KB  |  70 lines

  1. Newsgroups: comp.unix.aix
  2. Path: sparky!uunet!kithrup!hoptoad!decwrl!sdd.hp.com!usc!sol.ctr.columbia.edu!ira.uka.de!chx400!aragorn.unibe.ch!iacrs1!haedener
  3. From: haedener@iacrs1.unibe.ch (Konrad Haedener)
  4. Subject: Where are you?
  5. Message-ID: <1992Aug19.122848.18225@aragorn.unibe.ch>
  6. Keywords: PATH, ksh, CWD, prompt
  7. Sender: haedener@iacrs1 (Konrad Haedener)
  8. Reply-To: haedener@iacrs1.unibe.ch
  9. Organization: University of Berne
  10. Date: Wed, 19 Aug 1992 12:28:48 GMT
  11. Lines: 57
  12.  
  13. If you:     o usually work under aixterm
  14.             o have problems tracking your CWD under ksh
  15.             o don't want to waste half of each prompted line
  16.               to display your CWD by fiddling with PS1
  17. then 
  18.               consider the following:
  19.  
  20. o put "aixterm.statusLine: true"
  21.       "aixterm.statusNormal: true" 
  22.   in your ~/.Xdefaults (or do anything similar to that effect)
  23.  
  24. o put "ENV=$HOME/.kshrc"
  25.       "export ENV" 
  26.   in your ~/.profile (or do anything similar to that effect)
  27.  
  28. o create ~/.kshrc with the following (or similar) contents:
  29.   ==== cut ====
  30. if [ $TERM = aixterm ] ; then
  31.    BOLD="\033[1m"
  32.    TSL="\033[?1T"
  33.    FSL="\033[?F"
  34.    EL="\033[K"
  35.    SGR0="\033[0;10m"
  36.    KCUU1="\033[A"
  37.    HOST=`uname -n`
  38.  
  39.    cwd () {
  40.        cd $*
  41.        echo $TSL$EL"You are on "$HOST" in "$BOLD$PWD$SGR0$FSL$KCUU1
  42.    }
  43.    alias cd=cwd
  44. fi
  45.  
  46. if [ $TERM = vt220 ] ; then
  47.  
  48.    cwd () {
  49.        cd $*
  50.        PS1=$PWD"> "
  51.        export PS1
  52.    }
  53.    alias cd=cwd
  54. fi
  55.  
  56. if [ $TERM = aixterm ] ; then
  57.    cd .
  58.    clear
  59. fi
  60.   ==== cut ====
  61.  
  62. You will get your hostname and current working directory displayed
  63. and tracked in the aixterm's status line (and PS1 usually left alone).
  64. Enjoy,
  65. -- 
  66. Konrad Haedener                             Phone: +41 31 65 42 25
  67. Institute for Physical Chemistry            FAX:   +41 31 65 44 99
  68. University of Berne
  69. Switzerland                                 haedener@iacrs1.unibe.ch
  70.