home *** CD-ROM | disk | FTP | other *** search
- #----------------------------------------------------------------------#
- # File: interface
- # Auth: Christoph. Alex. North-Keys -- Fri Jan 31 08:32:49 CST 1992
- # Desc: interface determination, elfshell, bash version
- #----------------------------------------------------------------------#
- message interface' '
-
- if [ ! "$TERM" ] ; then TERM=unknown ; fi # fall through to case default
- case "$TERM" in
- \|*) # if pipe sign appears, form is `|commands...'
- GURU="`expr "$TERM" : '|\(.*\)'`" ; export GURU
- TERM=guru
- eval "$GURU"
- ;;
- esac
- bel=""
- esc=""
- case "$TERM" in
- xterm)
- if [ ! "$XCONSOLE" ] ; then
- title () { echon "$esc]2;$*$bel" ; }
- label () { echon "$esc]1;$*$bel" ; }
- icon () { echon "$esc]I;$*$bel" ; }
- say () { title $* ; }
- dot () { title [-${HOSTNICK}- $PWD ] ;
- label ${HOSTNICK}: `basename $PWD` ; }
- fi
- if [ ! "$DISPLAY" ] ; then DISPLAY=${HOSTNICK}:0 ; export DISPLAY ; fi
- message $DISPLAY' '
- ;;
- sun*)
- if [ "$WINDOW_PARENT" ] ; then
- title () { echon "$esc]l$*$esc\\" ; }
- label () { echon "$esc]L$*$esc\\" ; }
- icon () { echon "$esc]I$*$esc\\" ; }
- say () { title $* ; }
- dot () { title [-${HOSTNICK}- $PWD ] ; }
- else
- if [ "`tty`" != "/dev/console" ] ; then
- TERM="`tset - -I -Q -r -m :\?$TERM`"
- fi
- fi
- ;;
- wy*)
- title () { echo "$escF$*\\r\\c" ; }
- say () { title "$*" ; }
- dot () { title "`logname` `tty | sed 's@/dev/@@g'` `pwd`" ; }
- ;;
- *) # default
- say () { echo $* ; }
- dot () { echo $PWD ; }
- case "$TERM" in
- emacs) stty -echo -onlcr nl ;;
- network) TERM="`tset - -I -Q -r -m :\?xterm`" ;;
- unknown|dumb|su) TERM="`tset - -I -Q -r -m :\?vt100`" ;;
- ?*) if [ "$PS1" ]; then message $TERM' ' ; fi ;;
- *) TERM="`tset - -I -Q -r -m :\?vt100`" ;;
- esac
- ;;
- esac
-
- export TERM
-
- #----eof
-