home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / elisp / modes / J-Shell-1.1 / dot-zshrc < prev    next >
Encoding:
Text File  |  1993-03-06  |  1.3 KB  |  56 lines

  1. # $Id: dot-zshrc,v 1.0 1993/03/07 04:42:04 jct Exp $
  2.  
  3. ## This file contains a sample script showing how to set up ksh to
  4. ## work properly with j-shell.  Before examining this script, please
  5. ## read the comments in the file dot-tcsh; the comments in that script
  6. ## describe steps common to the scripts for all shells.
  7.  
  8. # Comments delimited by a single # are specific to zsh.
  9.  
  10. if [ "$TERM" = "emacs" ]
  11. then
  12.     unsetopt zle
  13.     stty nl -echo        # Keeps ^M from echoing
  14.  
  15.     ## Step A.
  16.     emacscd="\033EmAcScd"
  17.     emacshost="\033EmAcShost"
  18.  
  19.     ## Step B.
  20.     chpwd() { echo $emacscd $PWD }
  21.     hostcmd() { echo $emacshost `hostname` }
  22.     reorient() { hostcmd ; chpwd }
  23.  
  24.     ## Step C.
  25.     # In zsh, the chpwd function is called automatically anytime
  26.     # the working directory changes, so we need no special aliases.
  27.  
  28.     ## Step D.
  29.     fake_rlogin() { rlogin $*; reorient ; }
  30.     alias rlogin='fake_rlogin '
  31.  
  32.     fake_sh() { sh $*; reorient ; }
  33.     alias sh=fake_sh
  34.  
  35.     fake_ksh() { ksh $*; reorient ; }
  36.     alias ksh=fake_ksh
  37.  
  38.     fake_csh() { csh $*; reorient ; }
  39.     alias csh=fake_csh
  40.  
  41.     fake_tcsh() { tcsh $*; reorient ; }
  42.     alias tcsh=fake_tcsh
  43.  
  44.     fake_zsh() { zsh $*; reorient ; }
  45.     alias zsh=fake_zsh
  46.  
  47.     fake_bash() { bash $*; reorient ; }
  48.     alias bash=fake_bash
  49.  
  50.     fake_tcl() { tcl $*; reorient ; }
  51.     alias tcl=fake_tcl
  52.  
  53.     ## Step E.
  54.     reorient
  55. fi
  56.