[BACK]Return to ksh.kshrc CVS log [TXT][DIR] Up to [local] / src / etc

Diff for /src/etc/ksh.kshrc between version 1.7 and 1.8

version 1.7, 2001/04/30 18:24:21 version 1.8, 2001/11/19 03:03:33
Line 2 
Line 2 
 #       $OpenBSD$  #       $OpenBSD$
 #  #
 # NAME:  # NAME:
 #       ksh.kshrc - global initialization for ksh  #       ksh.kshrc - global initialization for ksh
 #  #
 # DESCRIPTION:  # DESCRIPTION:
 #       Each invocation of /bin/ksh processes the file pointed  #       Each invocation of /bin/ksh processes the file pointed
Line 26 
Line 26 
 #       This file is provided in the hope that it will  #       This file is provided in the hope that it will
 #       be of use.  There is absolutely NO WARRANTY.  #       be of use.  There is absolutely NO WARRANTY.
 #       Permission to copy, redistribute or otherwise  #       Permission to copy, redistribute or otherwise
 #       use this file is hereby granted provided that  #       use this file is hereby granted provided that
 #       the above copyright notice and this notice are  #       the above copyright notice and this notice are
 #       left intact.  #       left intact.
   
 case "$-" in  case "$-" in
 *i*)    # we are interactive  *i*)    # we are interactive
Line 55 
Line 55 
         tty=`tty`          tty=`tty`
         tty=`basename $tty`          tty=`basename $tty`
         TTY=${TTY:-$tty}          TTY=${TTY:-$tty}
   
         set -o emacs          set -o emacs
   
         alias ls='ls -CF'          alias ls='ls -CF'
Line 153 
Line 153 
                 alias df='df -k'                  alias df='df -k'
                 alias du='du -k'                  alias du='du -k'
                 ;;                  ;;
         esac          esac
         alias rsize='eval `resize`'          alias rsize='eval `resize`'
   
         case "$TERM" in          case "$TERM" in
         sun*|xterm*)          sun*|xterm*)
                 case $tty in                  case $tty in
                 tty[p-w]*)                  tty[p-w]*)
                         case "$DISPLAY" in                          case "$DISPLAY" in
                         "")                          "")
                                 DISPLAY="`who | grep $TTY | sed -n 's/.*(\([^:)]*\)[:)].*/\1/p' | sed 's/\([a-zA-Z][^.]*\).*/\1/'`:0"                                  DISPLAY="`who | grep $TTY | sed -n 's/.*(\([^:)]*\)[:)].*/\1/p' | sed 's/\([a-zA-Z][^.]*\).*/\1/'`:0"
Line 203 
Line 203 
 }  }
 # if $1 is in path, remove it  # if $1 is in path, remove it
 del_path () {  del_path () {
   no_path $* || eval ${2:-PATH}=`eval echo :'$'${2:-PATH}: |    no_path $* || eval ${2:-PATH}=`eval echo :'$'${2:-PATH}: |
     sed -e "s;:$1:;:;g" -e "s;^:;;" -e "s;:\$;;"`      sed -e "s;:$1:;:;g" -e "s;^:;;" -e "s;:\$;;"`
 }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8