if ( $?loginsh && $?TERM && $?prompt && -f /usr/contrib/bin/zsh ) then setenv SHELL /usr/contrib/bin/zsh exec /usr/contrib/bin/zsh -l endif # -*- csh -*- # $Log: .tcshrc,v $ # Revision 1.2 1996/07/30 02:05:05 tjchol01 # Splitted to tjc.tcshrc. # # Revision 1.1 1996/07/30 01:33:19 tjchol01 # Initial revision # set echo # mesg y source ~/.environment alias ls 'ls-F' set prompt_char = "%#" # default #----------------------------------------------------------------- switch ($HOST) case ${SPDHOSTS}: if ($?prompt) then # for kerberos rcp from mecca alias rcp 'rcp -P' endif alias telnet 'telnet -P' alias mecca 'mecca -P' set cdpath=(~ /soft) switch ($gid) case 40011: # software group umask 002 set prompt_char = "@" breaksw case 40033: # onrnnp group umask 002 set prompt_char = "@" if (! $?DIR_CHANGED) then cd /home/research/onrnnp setenv DIR_CHANGED endif breaksw case 40069: # ci group umask 002 set prompt_char = "*" if (! $?DIR_CHANGED) then cd /home/research/ci setenv DIR_CHANGED endif breaksw endsw if ($USER == postgres) then umask 077 set prompt_char = "&" endif alias ls '/soft/gnu/bin/ls -F --color=tty' alias m 'less -ifMse' # overrides default alias r 'ruptime -ur \!*| egrep "draconis|orion|rigel|romulus|sirius|starbase|talos|terra|tycho|vulcan"' # alias cluster 'echo `cnodes` | xargs -n1' alias postgres "remsh $HOST -l postgres" alias soft 'newgrp software' alias onrnnp 'newgrp onrnnp' alias cig 'newgrp ci' alias dp '(dvips-ps -PPS \!* -o; floader \!$:s/dvi/ps)' alias dpa4 '(dvips-ps -ta4 -PPS \!* -o; floader \!$:s/dvi/ps)' alias lp /usr/bin/lp.orig alias lps 'lp -d wssp225ps' alias zlps 'zcat \!* | lp -d wssp225ps' alias lpss 'lpstat wssp225ps' alias lpsc 'cancel -a wssp225ps' alias lpse 'starbase enable wssp225ps' alias lpsd 'starbase disable wssp225ps' alias dps 'dvips -Pwssp225ps \!* -o' alias dps208 'dvips -P208dpi \!* -o' alias lpv 'lp -o single -d vogt203ps' alias lpv2 'lp -d vogt203ps' alias lpvs 'lpstat vogt203ps' alias lpvc 'cancel -a vogt203ps' alias lpve 'starbase enable vogt203ps' alias lpvd 'starbase disable vogt203ps' alias dpv 'dvips -Pvogt203ps \!* -o' alias lpa 'lp -d wssp219ps' alias lpas 'lpstat wssp219ps' alias lpac 'cancel -a wssp219ps' alias dpa 'dvips -Pwssp219ps \!* -o' alias lpj 'lp -d jbsp003ps' alias lpjs 'lpstat jbsp003ps' alias lpjc 'cancel -a jbsp003ps' alias dpj 'dvips -Pjbsp003ps \!* -o' alias cdl 'pd /soft/local/lib/xemacs/site-lisp' alias cdx 'pd /soft/local/lib/xemacs-19.14/lisp' alias cdt 'pd /soft/tex/lib/texmf/tex' alias killtek 'killproc tekps' alias top 'top -s1' breaksw case ${EGYPT_HOSTS}: set cdpath=(~ /usr/contrib/src) alias mc 'cd `/usr/contrib/bin/mc -P \!*`' # alias mc 'setenv MC `/usr/contrib/bin/mc -P *`; cd $MC; unsetenv MC' alias ldd 'elfdump -Dl' alias truss 'par -a 4096 -b 4096 -s -SS' alias lps 'lp -d wssp225ps' alias zlps 'zcat \!* | lp -d wssp225ps' alias lpss 'lpstat wssp225ps' alias lpsc 'cancel -a wssp225ps' alias lpse 'starbase enable wssp225ps' alias lpsd 'starbase disable wssp225ps' alias lpm 'cat \!* | starbase lp -d wssp220lj' alias lpms 'starbase lpstat wssp220lj' alias lpmc 'starbase cancel -a wssp220lj' alias cdx 'pd /usr/contrib/stow/xemacs-beta/lib/' alias cdl 'pd /usr/contrib/stow/xemacs-beta/lib/xemacs/site-lisp' alias cdt 'pd /usr/contrib/share/texmf/tex' alias top 'top -i1' alias ls '/usr/contrib/bin/ls -F --color=tty' breaksw case gerhardt: breaksw case "homer*": set cdpath=(~ /usr/local) set watch=(0 tjchol01 any dsembr01 any) breaksw case "kdp-sparc*": set cdpath=(~ /usr/local) set watch=(0 any any) breaksw case biomed: alias wroot 'su wroot' alias ldvi 'dvilj2p -s26' # for A4 paper breaksw case sunrise: breaksw case juggernaut: breaksw case "mug*": breaksw default: echo "WHAT HOST IS $HOST/$HOSTTYPE ?" breaksw endsw # tjc.tcshrc # # Revision 1.2 1996/07/30 02:04:14 tjchol01 # First release. # # Revision 1.1 1996/07/30 01:48:43 tjchol01 # Initial revision #----------------------------------------------------------------- #if ($?prompt == 0) exit #----------------------------------------------------------------- if ($?term != 0 && $?prompt != 0) then #if ( { /usr/bin/tty -s } ) then if (-x /soft/local/bin/fortune) then /soft/local/bin/fortune -a echo "" endif if (-x /usr/contrib/bin/fortune) then /usr/contrib/bin/fortune echo "" endif stty quit ^O dsusp ^- susp ^Z kill ^U intr ^C eof ^D start ^Q stop ^S hupcl -ixon -ixoff erase ^H # erase ^\? if ("$TERM" == "xterm" || "$TERM" == "xterm-color") then alias cwdcmd 'echo -n "]2;${HOST:ar}: $cwd]1;$HOST:ar"' cwdcmd # echo -n "]2;${HOST:ar}: $cwd]1;$HOST:ar" endif endif # # shell settings # set hosts = ( \ biomed.eti.pg.gda.pl \ gerhardt.spd.louisville.edu \ homer.louisville.edu \ mug3.ue.eti.pg.gda.pl \ orion.spd.louisville.edu \ sprint1.ipe.pw.edu.pl \ starbase.spd.louisville.edu \ talos.spd.louisville.edu \ kdp-sparc.kdp-baptist.louisville.edu \ $SPDHOSTL \ $EGYPT_HOSTL \ ) set autocorrect set autolist set correct=cmd set ellipsis set fignore=(.o) set histdup=prev set histlit #set history=200 set ignoreeof set listjobs=long set listmaxrows=20 set mail=(1 "$MAIL") set notify set rmstar # set complete=enhance #set savehist=200 merge unset autologout set prompt = "%B${HOST_ABBR}%~${prompt_char}%b " unset prompt_char # # keys # bindkey ^R i-search-back # home, end, delete bindkey -s "[4~" "" bindkey -s "[1~" "" bindkey -s "[3~" "" # popd, pushd # bindkey -s "[5~" "popd\n" # bindkey -s "[6~" "pushd .\n" # # aliases # alias untic 'infocmp' alias vt100 "set term = vt100-nam" alias vt220 "set term = vt220" alias vt320 "set term = vt320" alias psw "ps -fu $USER | egrep -v 'ps -fu|egrep -v ps -fu'" alias psc clu "'ps -ef | grep ^\!*'" alias pst "top -b -U$USER i" alias q 'quota -v | grep -v " 0 0 0 0 0 1"' alias x exit alias . 'cd' alias .. 'cd ..' alias ... 'cd ../..' alias .... 'cd ../../..' alias ..... 'cd ../../../..' alias md 'mkdir -p' alias cdd 'cd \!* ; l' alias mdd 'mkdir \!* ; cd \!*' alias rd rmdir alias up 'cd ..' alias +w chmod u+w alias -w chmod -w alias pd pushd alias pd2 pushd +2 alias pd3 pushd +3 alias pd4 pushd +4 alias po popd if ($?DISPLAY == 0) then alias e 'xemacs \!*' else alias e 'xemacs \!* &' endif alias l ls alias ll 'ls -lFG' alias lll 'ls --color=yes -laF \!* | fm' alias lm 'lll' alias la 'ls -laF' alias lw 'll -LU `where \!* | grep -v aliased`' # unsorted dereferenced alias lo 'll `locate \!*`' alias m $PAGER alias fm 'fold \!* | m -r' # temporary alias mR 'm README' alias mM 'm Makefile' alias mw 'm `where \!* | grep -v aliased`' alias mo 'm `locate \!*`' alias nms 'tbl \!* | nroff -ms | m' # nroff -ms alias tms 'tbl \!* | troff -t -ms | m' # troff -ms #alias mman 'groff -Tascii -man \!* | m' # get rid of stupid Fortran pages alias man '$PAGER `/bin/man -w \!* | egrep -v "/ftn/|No manual entry"`' alias mman 'neqn \!* | tbl | nroff -man | m' #tbl -TX /usr/contrib/man/man1/fvwm2.1 | neqn /usr/pub/eqnchar - | nroff -i /usr/lib/tmac/tmac.an | col| less -Msei alias ggrep 'find . -not -name \*.elc -not -name \*.o -type f -exec egrep \!:1 {} /dev/null \;' alias ggrepi 'find . -not -name \*.elc -not -name \*.o -type f -exec egrep -i \!:1 {} /dev/null \;' alias unman '(cat \!* | sed s/.\//g)' alias unshar 'sed "1,/^#/d" \!* | sh' alias gtart 'gtar tvzf' alias gtarx 'gtar xvzf' alias gtarc 'gtar cvzf' alias bf 'find . -name \!*' alias wd 'wdiff -t \!* | m' alias lookat '\!:1 xwd -root -display {\!:1}:0 | xwud' alias reload "xrdb -nocpp -merge $HOME/.Xdefaults" # # specific programs # alias xdvi 'xdvi -expert -allowshell -bg white -fg black' alias xdvia 'xdvia -allowshell -bg white -fg black' alias ghostview 'ghostview -bg white -fg black' alias zghostview 'zcat \!* | ghostview -bg white -fg black -' alias pine 'pine -d 0' alias agdb 'avs_dbx -debug gdb' alias adbedit 'sed -e s/! .*[+-].*$// -e s/^.*+0x\(.*\):/\1/ -e s/^.*+\(.*\):/\1/ -e s/^\(.*\):.*\1/\1/' alias scr 'screen' alias scrr 'screen -r' alias scrl 'screen -ls' alias dvi2tty 'dvi2tty -w132' # alias dvgt.debug '/soft/tex/bin/dvgt.debug -vtek4010 \!* | rawtty' alias dvgt 'dvgt \!* | rawtty' alias dvit 'dvi2tty -w132 \!* | m' alias reset 'tput reset' # # internet services # alias netfind "fep rlogin mudhoney.micro.umn.edu -l netfind -P" alias netfind1 "fep rlogin redmont.cis.uab.edu -l netfind -P" alias netfind2 "fep telnet -P bruno.cs.colorado.edu" alias netfind3 "fep rlogin netfind.icm.edu.pl -l netfind -P" alias de "rlogin -l de netfind.icm.edu.pl" alias sunsolve 'rlogin -l sunsolve sunsolve1.sun.com' #alias whois 'whois -h rs.internic.net' alias weather 'lynx gopher://UKCC.uky.edu/1menu%20WSERVICE%21191/WEATHLOU.INFO' alias weather1 'lynx gopher://UKCC.uky.edu/1menu%20WSERVICE%21191/WEATHER.INFO' alias subway "xhost +metro.jussieu.fr; telnet metro.jussieu.fr 10000" alias faq 'ftp rtfm.mit.edu' alias minerva1 'tn3270 ulkyvm' alias scrabble1 'telnet eel.st.usm.edu 7777' alias scrabble2 'telnet next7.cas.muohio.edu 8888' alias yahoo 'lynx http://www.yahoo.com/' alias gnus 'e -f gnus' alias vm 'e -f vm' alias w3 'e -f w3' alias ecompile 'xemacs -batch -f batch-byte-compile' alias lynx 'lynx -cache=1000' alias clynx 'lynx http://www.\!*.com/' alias lynxc clynx alias netscape 'netscape-beta -install' alias ap 'a2ps -p -nH -ns -1' alias xbouncebits 'xbouncebits -glide -copies 20 xlogo16' alias rn "echo kuku" alias we "echo kuku" # quote and makealias -- Get quoting right in csh aliases alias quote "/bin/sed -e 's/\\!/\\\\\!/g' -e 's/'\\\''/'\\\'\\\\\\\'\\\''/g' -e 's/^/'\''/' -e 's/"\$"/'\''/'" alias makealias "quote | /bin/sed 's/^/alias \!:1 /' \!:2*" # line length, no justify, no hyphenation, page length alias nr_fmt 'sed "1i .ll72 .na .hy 0 .pl 1" $* | nroff' alias ftp 'ncftp -d1 -r' alias ncftp 'ncftp' alias etalk 'xemacs -f etalk-batch' alias ytalk ytalk.fast alias talk ytalk alias testident 'telnet 130.236.254.1 114' alias bm 'perl -pe "s/x0d/x0a/g; s/[\x0-\x08\x0b-\x1f\x7f-\xff]+/./g" \!* | m' alias bmo 'perl -pe "s/x0d/x0a/g; s/[\x0-\x08\x0b-\x1f\x7f-\xff]+/./g" `locate \!*` | m' alias pstek 'pstopbm \!* | pbmtek' alias pstekd 'pstopbm \!* | pbmtek -d' #alias listdup 'perl -00 -ne "if ( /\\b(\\w+)(\\s+\\1)+\\b/i ) { print \"dup \$1 at \$.\\n\" }"' #alias listdup 'perl -00 -ne '\''if ( /\b(\w+)(\s+\1)+\b/i ) { print "dup $1 at $. ($_)\n" }'\' alias podman 'pod2man \!* | nroff -i /usr/lib/tmac/tmac.an | m' alias udiff '(diff -urd \!* | egrep -v "^Only in |^Binary files ")' alias cdiff '(diff -crd \!* | egrep -v "^Only in |^Binary files ")' alias glwi 'glimpse -w -i' alias glh 'glimpse -w -i' alias glc 'glimpse -w -i -H /var/contrib' # # completions # complete {dvilj,dvilj2p,dvicopy,xdvi,xdvia,dvips,dvit,dvgt,dp,dps,dps208,dpa,dpv,dpj} 'n/*/f:*.dvi/' complete {tex,tex-ps,latex*} 'n/*/f:*.{tex{,m},dtx,ins}/' complete {mp,mpost} 'n/*/f:*.mp/' complete {lpm} 'n/*/f:*.lj/' complete {psselect,gv,ghostview,wssp225,vogt203,lps,lpv,lpj,lpa,up2*,fload,floader,pstek,pstekd,pstopbm,pstotext} 'p/*/f:*.{{{e,}ps{,0},[0-9],[0-9][0-9]},pdf}/' complete pbmtek 'p/*/f:*.pbm/' complete {zghostview,zlps,zlpv,zlpj,zlpa} 'p/1/f:*.ps{,[012]}.gz/' complete gtar{c,t,x} 'p/1/f:*.{tar.{gz,Z},tgz}/' complete {ctangle,cweave} 'p/1/f:*.w/' complete {bison,yacc} 'n/*/f:*.y/' complete {lex,flex} 'n/*/f:*.l/' complete cd 'n/*/d/' complete {man,which,where,lw,mw} 'n/*/c/' #complete rcp 'c/*:/f/' 'p/*/$hosts/:' complete mount 'c/*:/f/' 'p/1/$hosts/:' '/p/2/d/' complete {remsh,ping,telnet,traceroute} 'p/1/$hosts/' complete {finger,talk,ytalk,etalk,las,last,write,mail} 'c/*@/($hosts)/' "p/1/($CI_GROUP)/" #complete last 'p/*/u/' #complete {send,write,talk,pine} 'p/*/u/' complete kill c/-/S/ c/%/j/ complete {-%*,fg,bg,stop} c/%/j/ # fill in the jobs builtin # this one is simple... complete rcp 'c/*:/f/' 'p/2/$hosts/:' 'n/*/f/' #complete rcp 'c/*:/f/' 'C@[./]*@f@' 'n/*/$hosts/:' # From Michael Schroeder: # This one will rsh to the file to fetch the list of files! # complete rcp 'c%*:%`set q=$:-0;set q="$q:s/:/ /";set q=($q " ");rsh $q[1] ls -dp $q[2]\*`%%' 'C@[./]*@f@' 'n/*/$hosts/:' complete setenv 'p/1/e/' 'n/DISPLAY/$hosts/:0' complete unsetenv 'n/*/e/' # complete source 'c@~@(/.tcshrc)@' 'n/*/f/' complete xhost 'c/[+-]/$hosts/' 'n/*/$hosts/' complete touch 'c/-/"(a c f m)"/ n/*/f/' complete {gzcat,zmore} 'n/*/f:*.{gz,Z,z,zip}/' complete unarj 'n/*/f:*.arj/' complete unzip 'n/*/f:*.zip/' complete gzip 'n/*/f:^*.{gz,Z,z,zip,taz,tgz}/' complete {gunzip,zfile,ztouch} 'n/*/f:*.{gz,Z,z,zip,taz,tgz}/' complete znew c/-/"(f t v 9 P K)"/ n/\*/f:\*.Z/ complete users p/1/x:''/ complete who p/1/x:''/ n/am/"(i)"/ n/are/"(you)"/ complete ps c/-t/x:''/ c/-/"(a c C e g k l S t u v w x)"/ \ n/-k/x:''/ N/-k/x:''/ n/\*/x:''/ complete chown c/-/"(f R)"/ C/./f/ c/\*./g/ n/-/u/. p/1/u/. n/\*/f/ complete chgrp c/-/"(f R)"/ n/-/g/ p/1/g/ n/\*/f/ complete cat c/-/"(b e n s t u v)"/ n/\*/f/ # complete mv c/-/"(f i)"/ n/-/f/ N/-/d/ p/1/f/ p/2/d/ n/\*/f/ # complete cp c/-/"(i p r)"/ n/-\*r/d/ n/-/f/ N/-/d/ \ # p/1/f/ p/2/d/ n/\*/f/ # # overrule /etc/csh.login settings in xterm -ls # if ( $?loginsh && $?DISPLAY ) then unsetenv ENV_SET source ~/.environment endif # # .tcshrc.personal # if ( -r ~/.tcshrc.personal ) then source ~/.tcshrc.personal endif # # .login # if ( $?loginsh && $?TERM ) then if ($HOST =~ ${EGYPT_HOSTS}) then # get tgt if on mecca if ( ! { kinit -R } ) then kinit -f -l 2d -r 100d endif if ($?DISPLAY) then ( xauth extract - $DISPLAY | talos /usr/X11R6/bin/xauth merge - ) xset fp+ /ets/Mathematica-Fonts/X endif endif if ($?prompt != 0) then mesg y endif switch ($TERM) case {vt100,vt220}: setenv TERM vt320-25 # no breaksw! case vt320: tty > ~/.raw_tty eval `resize` tput smkx # set cursor keys to \EOx screen -R breaksw case hp: breaksw endsw endif