# .cshrc - *csh startup file # Steve Kinzler, kinzler@cs.indiana.edu, Apr 96/May 00 # http://www.cs.indiana.edu/~kinzler/home.html#unixcfg # Append to /{,root/}.{,t}cshrc, ~oracle/.cshrc if necessary # ("$CSH_ENVIRON != $USER" clause may need to be excluded): # if ( $?CSH_ENVIRON ) then # if ( ~$CSH_ENVIRON != '/' && ~$CSH_ENVIRON != '/root' && \ # $CSH_ENVIRON != $USER && -r ~$CSH_ENVIRON/.cshrc ) then # source ~$CSH_ENVIRON/.cshrc # endif # endif # Fix /etc/*cshrc* if necessary -- see below. umask 022 if ( ! $?USER ) then setenv USER "$LOGNAME" endif if ( -o /bin/su || -o /usr/bin/su || -o /u/oracle/oracle ) then set su if ( $?CSH_ENVIRON ) then set user = $CSH_ENVIRON endif set home = ~$USER unsetenv BASEPATH PATHPLUS else setenv CSH_ENVIRON $USER endif if ( ! $?ARCHIT ) then setenv ARCHIT `~/binp/archit` endif alias +abat 'if ( -r ~/l/abat/.cshrc ) source ~/l/abat/.cshrc' alias +apache 'set path = ( $path /l/apache/bin )' alias +besteval 'if ( -r ~besteval/etc/cshrc ) source ~besteval/etc/cshrc' alias +cseval 'if ( -r ~cseval/etc/cshrc ) source ~cseval/etc/cshrc' alias +cssurv 'if ( -r ~cssurv/etc/cshrc ) source ~cssurv/etc/cshrc' alias +dumps 'set path = ( $path /usr/local/ws/qr/{bin,etc} ~dumps/bin )' alias +elmira 'if ( -r ~/l/elmira/.cshrc ) source ~/l/elmira/.cshrc' alias +fun 'set path = ( $path ~/l/fun/bin ~/l/fun/bin/$ARCHIT )' alias +games 'set path = ( $path /usr/local/games /usr/games )' alias +hra 'if ( -r /l/web/hra/etc/cshrc ) source /l/web/hra/etc/cshrc' alias +hyplan 'set path = ( $path ~/.hyplan/bin )' alias +iueval 'if ( -r ~iueval/etc/cshrc ) source ~iueval/etc/cshrc' # see http://www.cs.indiana.edu/csg/software/SunJDK.html alias +java 'set path = ( /l/jdk/bin /usr/java/default/bin $path )' alias +kde 'set path = ( $path /opt/kde/bin )' alias +oracle 'set path = ( $path ~oracle/bin )' alias +palm 'set path = ( /l/palm/bin $path )' alias +perl 'set path = ( $path /l/perl/bin )' alias +picons 'set path = ( /l/picons/bits /l/netpbm/bin $path' \ '/l/picons/{bin,apps} /l/aicons/support/scripts )' alias +sunpro 'set path = ( /opt/SUNWspro/bin $path )' alias +web 'set path = ( $path /l/web/bin )' alias +reset 'set path = ( ~/binp $BASEPATH )' if ( ! $?BASEPATH ) then set basepath = ( ~/bin ~/bin/$ARCHIT /usr/site/bin \ /usr/local/bin /usr/{ucb,bsd} /bin /usr/bin \ /usr/um/bin /usr/itd/bin /usr/vice/bin \ /usr/local/bin/X11 /usr/bin/X11 \ /usr/openwin/bin /l/X11R6/bin /usr/X11R5/bin \ /usr/local/adm/bin /usr/local/sbin /sbin /usr/sbin \ /usr/local/etc /etc /usr/etc \ /usr/ccs/bin /usr/5bin /usr/contrib/bin \ /usr/{local,um}/gnu/bin ) # /usr/hosts ) setenv BASEPATH "$basepath" +reset endif # Did a (Linux) system cshrc reset our PATH? *Sigh*, it shouldn't touch it. if ( $#path < 25 ) then # Gentoo's tcsh doesn't like this on one line. +reset # This is a kludge, additions are lost. endif # Optional convenience kludge. Shouldn't trigger any NFS mounts. if ( $?BACKPATH && ! $?PATHPLUS ) then if ( $?HOST ) then if ( "$HOST" =~ *moose* ) then +picons; +oracle endif if ( "$HOST" =~ alembic* || "$HOST" =~ swank* ) then +hra; +perl; +picons; +palm endif if ( "$HOST" =~ alamo* ) then +hra; +perl endif if ( "$HOST" =~ *ahm*.com.au ) then +hra endif if ( "$HOST" =~ [dp]kinzler* ) then +picons; +palm endif endif setenv PATHPLUS endif if ( $?prompt ) then if ( $?su ) then setenv EXINIT "so ~/.exrc" if ( ! $?alias_so ) then alias s 'mesg y; o' alias o 'alias s suspend; alias o suspend; suspend' set alias_so endif else alias S 'su root -c "exec $shell"' if ( $ARCHIT == sun4elf ) then alias O 'su oracle -c "exec $shell"' else alias O 'su oracle --session-command "exec $shell"' endif if ( ! $?alias_so ) then alias s 'alias s %"'"'su root'"'"; S' alias o 'alias o %"'"'su oracle'"'"; O' set alias_so if ( $?HOST ) then if ( "$HOST" =~ *.cs.indiana.edu ) alias s o endif endif endif set filec history = ( 1024 '%h\t%Y/%W/%D %P\t%R\n' ) notify unset autologout alias helpcommand cmdhelp # use with caution alias lo 'source ~/etc/lo; exit' alias resize 'set noglob; eval `\resize`; unset noglob' alias x '\x \!*; lo' alias fixbs 'setenv ERASE ^H; stty erase "$ERASE"; so' alias fixdel 'setenv ERASE ^\?; stty erase "$ERASE"; so' if ( $?tcsh ) then setenv VSHNUTMP /tmp alias V 'alias precmd "source ~/etc/precmd"; $VSH "$cwd"' if ( ! $?alias_v ) then alias v V alias vv 'h; V' set alias_v endif if ( $?ERASE ) then if ( "$ERASE" == ^H ) then bindkey ^H backward-delete-char bindkey ^? backward-char else bindkey ^H backward-char bindkey ^? backward-delete-char endif endif bindkey ^B backward-word bindkey ^D delete-word bindkey ^F forward-word bindkey ^G backward-char bindkey ^L clear-screen bindkey ^U keyboard-quit bindkey ^W backward-delete-word bindkey ^X delete-char-or-list bindkey ^] forward-char bindkey ^[^I complete-word-raw bindkey ^[^X list-choices-raw bindkey ^[^] tty-dsusp bindkey ^[* list-glob bindkey ^[a beginning-of-line bindkey ^[c normalize-command bindkey ^[g expand-glob bindkey ^[k kill-region bindkey ^[n normalize-path bindkey ^[v expand-variables bindkey ^[x exchange-point-and-mark bindkey "^[[3~" backward-char if ( $uid == 0 ) then # set prompt = '%S%m:%. #%s ' set prompt = '%{\e[41m%}%m:%. #%{\e[0m%} ' else if ( $?su ) then # set prompt = '%S%m:%. ?%s ' set prompt = '%{\e[45m%}%m:%. ?%{\e[0m%} ' else set prompt = '%S%m:%.%s ' endif set ampm color = ls-F dextract dunique histdup = prev histlit setty -istrip complete make 'n/-f/f/' 'c/*=/f/' \ 'n@*@`cat makefile Makefile |& sed -n "/No such/d; \ /^[^ #].*:/s/:.*//p"`@' endif endif unset savehist setenv AH alamode.hmrc.kines.umich.edu setenv BH alembic.hmrc.kines.umich.edu #etenv CH healthcheck.carelink.com.au setenv CH wellbeingassessment.ahm.com.au setenv FH alamoff.hmrc.kines.umich.edu #etenv LH login.itd.umich.edu setenv LH sftp.itd.umich.edu setenv PH ftp.hmrc.kines.umich.edu setenv SH swank.hmrc.kines.umich.edu setenv TH transit.hmrc.kines.umich.edu setenv WH www.hmrc.kines.umich.edu setenv YH trendy.hmrc.kines.umich.edu setenv ZH aludel.hmrc.kines.umich.edu # not CDPATH set cdpath = ( ~ ~/l /usr/site /usr/local /l /var/spool /usr/spool /u ) setenv CD_PATH ${HOME}:$HOME/l:/usr/site:/usr/local:/l:/var/spool:/usr/spool:/u setenv COMPUTE moose setenv CTWMRC ~/etc/ctwmrc setenv GREP 'gnu grep' setenv GREP_COLOR 04 setenv GREP_OPTIONS --color=auto setenv HPATH /usr/local/lib/syn setenv HTMLVIEW 'xrshio - webrowse -saw' setenv ILERC ~/etc/ilerc setenv INPUTRC ~/.inputrc setenv IMGBGLNK ~/l/arc/images/imgbg% setenv IMGBGRC ~/etc/imgbgrc setenv LESS CMdefiq setenv LESSCHARSET latin1 setenv LESSHISTFILE - setenv LESSKEY ~/etc/lesskey setenv LOCAL_DICT ~/libp/words setenv MANPATH2 $HOME/manp:$HOME/man:$HOME/l/fun/man setenv PAGER view setenv PERLDOC_PAGER less setenv RC_FAVOR RCS setenv RCPCMD scp setenv RSHCMD ssh setenv TWMRC ~/etc/twmrc setenv URLVIEW 'xrshio - webrowse -uw' setenv VSH vshnu # vsh* only setenv VSHRC ~/etc/vshrc setenv VSHNUCFG ~/etc/vshnucfg setenv VSHNURC ~/etc/vshnurc setenv WWW_HOME file://localhost$HOME/etc/work.html setenv XRSH_AUTH_TYPE none setenv ZOPTS '-gz -s .tgz -m -' setenv VIMCMD via setenv VISUAL "$VIMCMD" setenv EDITOR "$VISUAL" setenv MAIL /var/spool/mail/$USER if ( $?HOST ) then if ( "$HOST" =~ *.cs.indiana.edu ) setenv MAIL /nfs/mail$MAIL endif setenv MAILER 'mutt -z' #mail setenv MAILHOST $BH setenv PRINTER1 ps325a1 # simplex, 1-sided setenv PRINTER2 ps325a2 # duplex, 2-sided long edge, standard setenv PRINTERT ps325aT # tumble, 2-sided short edge, flip setenv PRINTER $PRINTER2 if ( $?HOST ) then if ( "$HOST" =~ ?kinzler* ) setenv PRINTER lp0 endif setenv LPDEST "$PRINTER" setenv WB_KEEP forever setenv WB_PWD 'cwd -n' setenv WB_RUNURL seticonns setenv WB_NETSCAPE firefox #mozilla # see also ct,tw:/warpto.*Mozilla/ if ( $?HOST ) then if ( "$HOST" =~ dkinzler* ) setenv PILOTPORT net:192.168.1.2 # autocreated when hotsync starts via /etc/udev/rules.d, # requires uucp group permissions, don't use ttyUSB1: if ( "$HOST" =~ alembic* ) setenv PILOTPORT /dev/ttyUSB0 endif setenv PILOTRATE 38400 if ( $?LINUX ) setenv PILOTRATE 115200 setenv XCOPILOTARGS "-datadir $HOME/l/palm/copilot -serial -ramsize 2048" setenv XCOPILOTMEMVERSION 2 setenv PALMUSER ux50 if ( ! $?LS_COLORS ) setenv LS_COLORS '' if ( ! $?LS_OPTIONS ) setenv LS_OPTIONS '' if ( ! $?TERMCAP || $?STY ) setenv TERMCAP ~/etc/termcap if ( "$TERMCAP" !~ */* && "$TERMCAP" !~ *=* ) setenv TERMCAP ~/etc/termcap if ( ! $?TERMINFO ) setenv TERMINFO ~/etc/terminfo # in case the system csh initialization undoes my .login's setenvls if ( $?BACKPATH && "$LS_OPTIONS" != '' && "$LS_COLORS" == '' ) then setenvls -c > /tmp/sls$$ source /tmp/sls$$; rm -f /tmp/sls$$ endif if ( ! $?XFILESEARCHPATH && $ARCHIT == sun4elf ) then set x = /usr/lib/X11 o = /usr/openwin/lib t = %T/%N%S setenv XFILESEARCHPATH $x/%T/%N%C%S:$x/${t}:$o/locale/%L/${t}:$o/$t unset x o t endif if ( $?REMOTEHOST ) then setenv RH "$REMOTEHOST" if ( "x$RH" == x ) setenv RH "$HOST" if ( $?DISPLAY && ! $?SSH_CLIENT && ! $?SSH2_CLIENT ) then if ( "$DISPLAY" !~ kinzler2* ) setenv DISPLAY "${REMOTEHOST}:0" endif endif setenv LANG C unalias cp unalias mv unalias rm alias ls 'gnu ls -a $LS_OPTIONS' alias lsc 'gnu ls -aC $LS_OPTIONS' alias lls 'gnu ls -al $LS_OPTIONS' alias lsl 'gnu ls -agl $LS_OPTIONS' alias l lls alias _ "rename -p 's/[ \t]/_/g'" alias at '(setenv SHELL /bin/sh; exec /usr/bin/at \!*)' alias catrm '(cat -- \!* && rm -- \!*)' alias cb cutbuf alias ccc 'cc -O -s -o \!^:r \!*' alias gccc 'gcc -O -s -o \!^:r \!*' alias cut80 'expand \!* | cut -c1-79' alias doctxt 'antiword -f -w 79 -s' alias grep '$GREP' alias h 'pushd ~/work > /dev/null' alias hib 'screensaver blank lock; sudo hibernate' alias html2txt 'lynx -dump -force_html /dev/stdin' alias ifc ifconfig alias lc "rename -p '"'s/.*/\L$&/'"'" alias lcext "rename -p '"'s/\.[^.]+$/\L$&/'"'" alias m mail alias ma 'mailaudit -t && scph ma `hosts main`' alias rsh rshp alias scpw '$RCPCMD \!*\:/u/kinzler/work' alias so 'source ~/.cshrc' alias sortd 'sort | uniq -d' #se WWW::Shorten; alias tinyurl shorten alias tls 'tree -aAC' alias tlls 'tree -aACpugsD' alias vi via alias vidiff 'vimdiff \!*; rmview \!* >& /dev/null' # WARNING: saving scp://files can change their permissions alias viscp 'vi scp://\!\!:1/`tag -f \!\!:2`' alias vidiffscp 'vidiff scp://\!\!:1/`tag -f \!\!:2` `tag -f \!\!:2`' alias wbid 'setenv WB_ID `xwinid -i $WB_NETSCAPE`' alias wheval 'echo $IUEVAL_USER $semester' alias www webrowse alias xtit 'setenv WINDOWID `xtitletag \!*`' alias yy 'echo \!-1 | cb' alias to 'xtitle \!*; exec $RSHCMD \!*' alias toa 'xtitle alamode; exec $RSHCMD $AH' alias toA 'xtitle ALAMODE; exec $RSHCMD $AH' alias tob 'xtitle alembic; exec $RSHCMD $BH' alias toB 'xtitle ALEMBIC; exec $RSHCMD $BH' alias tor 'xtitle carelink; exec $RSHCMD $CH' alias toS 'xtitle SWANK; exec $RSHCMD $SH' alias tof 'xtitle alamoff; exec $RSHCMD $FH' alias toF 'xtitle ALAMOFF; exec $RSHCMD $FH' alias work2k 'scph -r -X \!* $KH' alias work2z 'scph -r \!* $KH && ssh $KH cd work\;' \ 'scph -r -X \!* aludel && rm -r \!*' alias clearcols 'eval `cols unsetenv`' alias setcols 'cols setenv > /tmp/sc$$; source /tmp/sc$$; rm -f /tmp/sc$$' alias showcols 'cols show' alias sc setcols alias ckwebhra 'safe GET https://$WH/hra/ |' \ 'grep -s Enter > /dev/null || echo Web HRA is down'