home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20110502.etc.tar.gz / bradford.20110502.etc.tar / etc / csh.cshrc < prev    next >
Text File  |  2006-04-27  |  5KB  |  215 lines

  1. #
  2. # (c) System csh.cshrc for tcsh, Werner Fink '93
  3. #                         and  J"org Stadler '94
  4. #
  5. # This file sources /etc/profile.d/complete.tcsh and
  6. # /etc/profile.d/bindkey.tcsh used especially by tcsh.
  7. #
  8. # PLEASE DO NOT CHANGE /etc/csh.cshrc. There are chances that your changes
  9. # will be lost during system upgrades. Instead use /etc/csh.cshrc.local for
  10. # your local settings, favourite global aliases, VISUAL and EDITOR
  11. # variables, etc ...
  12. # USERS may write their own $HOME/.csh.expert to skip sourcing of
  13. # /etc/profile.d/complete.tcsh and most parts oft this file.
  14. #
  15. onintr -
  16. set noglob
  17. #
  18. # Default echo style
  19. #
  20. set echo_style=both
  21.  
  22. #
  23. # If `login files' are not sourced first
  24. #
  25. if ( ${?loginsh} && ! ${?CSHRCREAD} ) then
  26.     source /etc/csh.login >& /dev/null
  27. endif
  28.  
  29. #
  30. # In case if not known
  31. #
  32. if (! ${?UID}  ) set -r  UID="`id -ur`"
  33. if (! ${?EUID} ) set -r EUID="`id -u`"
  34.  
  35. #
  36. # Only for interactive shells
  37. #
  38. if (! ${?prompt}) goto done
  39.  
  40. #
  41. # Let root watch its system
  42. #
  43. if ( "$uid" == "0" ) then
  44.     set who=( "%n has %a %l from %M." )
  45.     set watch=( any any )
  46. endif
  47.  
  48. #
  49. # This is an interactive session
  50. #
  51. # Now read in the key bindings of the tcsh
  52. #
  53. if ($?tcsh && -r /etc/profile.d/bindkey.tcsh) source /etc/profile.d/bindkey.tcsh
  54.  
  55. #
  56. # Some useful settings
  57. #
  58. set autocorrect=1
  59. set listmaxrows=23
  60. # set cdpath = ( /var/spool )
  61. # set complete=enhance
  62. # set correct=all
  63. set correct=cmd
  64. set fignore=(.o \~)
  65. # set histdup=prev
  66. set histdup=erase
  67. set history=1000
  68. set listjobs=long
  69. set notify=1
  70. set nostat=( /afs )
  71. set rmstar=1
  72. set savehist=( $history merge )
  73. set showdots=1
  74. set symlinks=ignore
  75. #
  76. unset autologout
  77. unset ignoreeof
  78. #
  79. if ( -x /usr/bin/dircolors ) then
  80.     if ( -r $HOME/.dir_colors ) then
  81.     eval `dircolors -c $HOME/.dir_colors`
  82.     else if ( -r /etc/DIR_COLORS ) then
  83.     eval `dircolors -c /etc/DIR_COLORS`
  84.     endif
  85. endif
  86. setenv LS_OPTIONS '--color=tty'
  87. if ( ${?LS_COLORS} ) then
  88.     if ( "${LS_COLORS}" == "" ) setenv LS_OPTIONS '--color=none'
  89. endif
  90. unalias ls
  91. if ( "$uid" == "0" ) then
  92.     setenv LS_OPTIONS "-A -N $LS_OPTIONS -T 0"
  93. else
  94.     setenv LS_OPTIONS "-N $LS_OPTIONS -T 0"
  95. endif
  96. alias ls 'ls $LS_OPTIONS'
  97. alias la 'ls -aF --color=none'
  98. alias ll 'ls -l  --color=none'
  99. alias l  'll'
  100. alias dir  'ls --format=vertical'
  101. alias vdir 'ls --format=long'
  102. alias d dir;
  103. alias v vdir;
  104. alias o 'less'
  105. alias .. 'cd ..'
  106. alias ... 'cd ../..'
  107. alias cd.. 'cd ..'
  108. alias rd rmdir
  109. alias md 'mkdir -p'
  110. # Handle emacs
  111. if ($?EMACS) then
  112.   setenv LS_OPTIONS '-N --color=none -T 0';
  113.   tset -I -Q
  114.   stty cooked pass8 dec nl -echo
  115. # if ($?tcsh) unset edit
  116. endif
  117.  
  118. #
  119. # Prompting and Xterm title
  120. #
  121. set prompt="%B%m%b %C2%# "
  122. if ( -o /dev/$tty ) then
  123.   alias cwdcmd '(echo "Directory: $cwd" > /dev/$tty)'
  124.   if ( -x /usr/bin/biff ) /usr/bin/biff y
  125.   # If we're running under X11
  126.   if ( ${?DISPLAY} ) then
  127.     if ( ${?TERM} && ${?EMACS} == 0 ) then
  128.       if ( ${TERM} == "xterm" ) then
  129.         alias cwdcmd '(echo -n "\033]2;$USER on ${HOST}: $cwd\007\033]1;$HOST\007" > /dev/$tty)'
  130.         cd .
  131.       endif
  132.     endif
  133.     if ( -x /usr/bin/biff ) /usr/bin/biff n
  134.     set prompt="%C2%# "
  135.   endif
  136. endif
  137. #
  138. # tcsh help system does search for uncompressed helps file
  139. # within the cat directory system of a old manual page system.
  140. # Therefore we use whatis as alias for this helpcommand
  141. #
  142. alias helpcommand whatis
  143.  
  144. #
  145. # Expert mode: if we find $HOME/.csh.expert we skip our settings
  146. # used for interactive completion and read in the expert file.
  147. #
  148. if (-r $HOME/.csh.expert) then
  149.     unset noglob
  150.     source $HOME/.csh.expert
  151.     goto done
  152. endif
  153.  
  154. #
  155. # Source the completion extension of the tcsh
  156. #
  157. if ($?tcsh) then
  158.     set _rev=${tcsh:r}
  159.     set _rel=${_rev:e}
  160.     set _rev=${_rev:r}
  161.     if (($_rev > 6 || ($_rev == 6 && $_rel > 1)) && -r /etc/profile.d/complete.tcsh) then
  162.     source /etc/profile.d/complete.tcsh
  163.     endif
  164.     #
  165.     # Enable editing in multibyte encodings for the locales
  166.     # where this make sense, but not for the new tcsh 6.14.
  167.     #
  168.     if ($_rev < 6 || ($_rev == 6 && $_rel < 14)) then
  169.     switch ( `locale charmap` )
  170.     case UTF-8:
  171.         set dspmbyte=utf8
  172.             breaksw
  173.     case BIG5:
  174.         set dspmbyte=big5
  175.             breaksw
  176.     case EUC-JP:
  177.         set dspmbyte=euc
  178.             breaksw
  179.     case EUC-KR:
  180.         set dspmbyte=euc
  181.             breaksw
  182.     case GB2312:
  183.         set dspmbyte=euc
  184.         breaksw
  185.     case SHIFT_JIS:
  186.         set dspmbyte=sjis
  187.             breaksw
  188.     default:
  189.             breaksw
  190.     endsw
  191.     endif
  192.     #
  193.     unset _rev _rel
  194. endif
  195.  
  196. done:
  197. onintr
  198. unset noglob
  199.  
  200. #
  201. # Just in case the user excutes a command with ssh
  202. #
  203. if ( ${?SSH_CLIENT} && ! ${?CSHRCREAD} ) then
  204.     source /etc/csh.login >& /dev/null
  205. endif
  206.  
  207. #
  208. # Local configuration
  209. #
  210. if ( -r /etc/csh.cshrc.local ) source /etc/csh.cshrc.local
  211.  
  212. #
  213. # End of /etc/csh.cshrc
  214. #
  215.