home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume39 / elfshell / part01 / .elven / csh / .cshrc.v3 next >
Encoding:
Text File  |  1993-08-29  |  5.0 KB  |  170 lines

  1. #=======================================================================# 
  2. #
  3. #       File:     .cshrc
  4. #        Support:  .setheaders  (support file for an alias)
  5. #       Descrip:  (with humour:) Sample .cshrc file for new users.
  6. #       Author:   Christoph. A. North-Keys (erlkonig@snowwhite)
  7. #       Rev:      3.1 (Mittwoch.d.30.Maerz.1988)
  8. #
  9. #=======================================================================#
  10.  
  11. set term = "$term"
  12. if !($?LOGGED) source ~/.login
  13.  
  14. set cdpath = (. ~ ~/aux ~/Critters)
  15. set X10path = /usr/new
  16. set X11path = (/usr/local/X11 /usr/new)
  17. alias pathset 'set path=(. ~/bin /bin /usr/bin /usr/local /usr/lib `echo $Xpath` /usr/ucb /usr/5bin /usr/games) ; rehash'
  18. alias X10set 'set Xpath = "$X10path" ; pathset'
  19. alias X11set 'set Xpath = "$X11path" ; pathset'
  20.  
  21. X11set
  22.  
  23. if ($?USER == 0 || $?prompt == 0) exit
  24.  
  25.     echo "Entering C Shell" 
  26.  
  27.     set history = 100 savehist = 50
  28.     set nobeep
  29.  
  30.     # Set search directories
  31.     set cdpath = (. ~)
  32.     set path=(. ~/bin /bin /usr/bin /usr/local /usr/lib /usr/ucb /usr/5bin /usr/games)
  33.     alias m 'less'
  34.     alias pg 'pg -c -n -p " Page=(%d):"'
  35.     alias h 'history -r | m'
  36.     alias self 'source ~/.cshrc'
  37.     alias pp  'psplot \!* | lpr -Plw1 -h'
  38.     alias cl    clear
  39.  
  40.     setenv TTY `tty`
  41.     set     filec
  42.     set        notify
  43.     set        prompt="$HOST-\!% "
  44.     set        prompt="`echo $HOST|sed 's/.cc.utexas.edu%//'`-\!% "
  45.  
  46.     if ($TTY != '/dev/console') then
  47.         if (($TERM == 'sun-cmd') || ($TERM == 'sun') || \
  48.             ($term == 'sun-cmd') || ($term == 'sun')) then
  49.             echo 'Assuming SunWindows environment.'
  50.             setenv HEADERS "sunheaders"
  51.         else  #Xwindows
  52.             echo 'Assuming Xwindows environment; use noheaders to cancel.'
  53.             setenv HEADERS "xheaders"    
  54.             setenv SCREEN "0"
  55.             setenv DPY "0"
  56.             setenv DISPLAYMACH $HOST
  57.             if ($?DISPLAY == 0) then
  58.                 setenv SCREEN "0"
  59.                 setenv DISPLAY $HOST":"$DPY"."$SCREEN
  60.             endif
  61.             setenv RESOURCE_MANAGER "$HOME/.X11defaults"
  62.             echo 'Assuming Xserver  '$HOST','
  63.             echo '         Xdisplay '$DISPLAY','
  64.             echo '         Xdpy     '$DPY','
  65.             echo '         Xscreen  '$SCREEN', use xdisp to change.'
  66.         endif
  67.     else
  68.         echo 'Assuming minimal raw terminal environment.'
  69.         setenv HEADERS "noheaders"
  70.     endif
  71.  
  72.  
  73.     alias h 'history -r'
  74.     alias pwd 'echo $cwd'
  75.     alias .   pwd
  76.     alias say 'echo "\!*"'
  77.     alias cd    'cd \!*; echo -n "]l $cwd \"'
  78.     alias rrlogin  "echo -n ']l \!* '; rlogin \!*"
  79.  
  80.     # ...more
  81.  
  82.     alias setheaders 'setenv HEADERS \!* ; source ~/.setheaders'
  83.     setheaders $HEADERS
  84.  
  85.     alias st 'suntools -i'
  86.     alias sou    source
  87.     alias ex    'chmod +x'
  88.     alias key    'man -k'
  89.     
  90.     # Route file to laser writer
  91.     alias [] 'lpr -Plw\!*'
  92.  
  93.     # Queries about laser writer
  94.     alias []? 'lpq -Plw\!*'
  95.     # [] commands with special formatting--from usernote
  96.     alias [m]  'ptroff -man -Plw\!*'
  97.  
  98.     # Name present directory and describe members
  99.     alias LI    'say listing files \!* ; ls -FlAgs    \!* ; pwd'
  100.     alias L     'say listing files \!* ; ls -Fs     \!* ; pwd'
  101.     alias l     'say listing files \!* ; ls -Fa        \!* ; pwd'
  102.     alias li    'say listing files \!* ; ls -Flags     \!* ; pwd'
  103.     
  104.     alias lf    'say listing dir/file  \!* ; ls -asgldF \!* ; pwd'
  105.     alias ]d    'pushd \!* ; l'
  106.     alias ]dq    'pushd \!* ; pwd'
  107.     alias [d    'popd ; l'
  108.     alias [dq    'popd ; pwd'
  109.     alias .     'pwd'
  110.  
  111.     # File storage management
  112.     alias q     'say quotas for $user ; quota -v ; pwd'
  113.  
  114.     # Move to auxiliary directory and ...
  115.     alias am    'if (-e ~/aux/\!^) set preaux = $cwd ; cd ~/aux/\!^ ; pwd'
  116.     alias ab    'cd $preaux ; pwd'
  117.  
  118.     # Commands supporting fast moves to key directories
  119.     alias Xc  ']d ~/Xconq/c'
  120.     alias M   ']d ~/Critters/MentalArmor'
  121.  
  122.     # Move (direct, directory) to given dir, name it and list 
  123.     alias md 'cd \!* ; l'
  124.     alias mq 'cd \!* ; pwd'
  125.  
  126.     # Move up to parent dir, name it and ls
  127.     alias mu 'cd .. ; l'
  128.  
  129.     # Cleanup command
  130.     alias ~~ 'say killing files in $cwd ; rm -i .*~ .*% .*OLD .*old *~ *% *OLD *old #*# ; say done killing files in $cwd ; sleep 1 ; pwd'
  131.  
  132.     # Add ability to run direct scripts without reshell NOT COMMAND
  133.     alias shell /bin/csh -f
  134.  
  135.     # Auto-select suntools background
  136.     alias pictools 'suntools -background ~/rasters/\!*.ras -toggle_enable'
  137.     alias pictwols 'suntools -pattern ~/images/tess/\!:1.icon -background ~/rasters/\!:2.ras -toggle_enable'
  138.  
  139.     # Clear screen
  140.     alias .     pwd
  141.     
  142.     # Specialized window variations
  143.     if ($term != 'sun-cmd') set filec
  144.     alias wob echo -n "\[q"
  145.     alias bow echo -n "\[p"
  146.     umask 22    
  147.     # Section concerning Xwindows
  148.     alias xbg    'xsetroot -bitmap ~/rasters/\!*.ras' 
  149.     alias xdisp     'setenv DISPLAYMACH \!:1 ; setenv SCREEN \!:2 ; setenv DISPLAY $DISPLAYMACH":"$SCREEN'
  150.     alias Xfd    'xfd $cwd/\!*'
  151.  
  152.     # Conclusion and note display
  153.     alias note  'say notepad ; vi ~/.notes/\!* ; pwd'
  154.     alias notes 'say notepads ; li ~/.notes'
  155.     alias note? 'say note on \!* ; cat ~/.notes/\!* ; pwd'
  156.  
  157.     # Terminal aids
  158.     alias rs 'resize >/dev/null'
  159.     alias se 'tset -e'
  160.     alias SE 'se ; rs ; clear ; pwd'
  161.     alias hp 'say configuring to hp \!:1 ; X10set ; SE ; xdisp \!:1 \!:2 ; setenv XENVIRONMENT .Xhp'
  162.     alias sun 'say configuring to sun \!:1 ; X11set ; xdisp \!:1 \!:2 ; setenv XENVIRONMENT .Xsun'
  163.  
  164. #####
  165.     pwd
  166.     
  167.  
  168. ########################################### End of .cshrc #####################
  169.  
  170.