# Austin's .cshrc file. # if ($?tcsh ) then bindkey "\e[1~" beginning-of-line # Home bindkey "\e[7~" beginning-of-line # Home rxvt bindkey "\e[2~" overwrite-mode # Ins bindkey "\e[3~" delete-char # Delete bindkey "\e[4~" end-of-line # End bindkey "\e[8~" end-of-line # End rxvt umask 002 endif if (( $?prompt ) && ( $?tcsh )) then set prompt = "%h:%m:%B%.2%b%# " endif # damn autologout set autologout=0 set printexitvalue # set CVSROOT setenv CVSROOT ~/records/cvs # set the CVS_RSH setenv CVS_RSH ssh # make man use less setenv PAGER "less" # let mutt (and others) use the term background as their background. setenv COLORFGBG "default;default" #make mutt and such things work #setenv TERM xterm-color #for use in autocomplete for various net commands. set hostnames = (...) set path=( ~/bin $path) # history... set history=30 noclobber # list possible answers when autocomplete fails set autolist=ambiguous # don't autocomplete to .o or ~ files when they exist # or .class set fignore = (.class .o .cmi .cmo \~) # set some neat complete tricks #complete process numbers for kill complete kill 'p/*/`ps | awk \{print\ \$1\}`/' #complete directory names for cd complete cd 'p/1/d/' complete rmdir 'C/*/d/' complete lsd 'C/*/d/' complete ssh 'p/1/$hostnames/' complete sftp 'p/1/$hostnames/' complete scp "c,*:/,F:/," "c,*:,F:$HOME," 'c/*@/$hostnames/:/' complete latex 'p/1/f:*.tex/' complete xdvi 'p/1/f:*.dvi/' complete which 'p/1/c/' complete where 'p/1/c/' complete man 'p/*/c/' complete alias 'p/1/a/' complete unalias 'p/1/a/' complete unset 'p/1/s/' complete set 'p/1/s/' # environment variables complete unsetenv 'p/1/e/' complete setenv 'p/1/e/' #(kinda cool: complete first arg with an env variable, and add an =, # continue completion of first arg with a filename. complete 2nd arg # with a command) complete env 'c/*=/f/' 'p/1/e/=/' 'p/2/c/' # limits complete limit 'p/1/l/' # key bindings complete bindkey 'C/*/b/' # groups complete chgrp 'p/1/g/' # users complete chown 'p/1/u/' # set up cc to complete only with files ending in .c, .a, and .o complete cc 'p/*/f:*.[cao]/' # of course, this completes with all current completions complete uncomplete 'p/*/X/' # complex completion for ln # In all cases, if you start typing, it completes with a filename # But if you complete without typing anything you get this: # first argument: adds "-s" # arguments that follow -s: reminds you of which argument is expected complete ln 'C/?/f/' 'p/1/(-s)/' 'n/-s/x:[first arg is path to original file]/' 'N/-s/x:[second arg is new link]/' set PICS = ".gif,.jpg,.tpic,.pic,.tiff,.xpm,.ppm" set PS = ".ps,.eps,.epsi,.psc,.epsc,.deps,.depsc" set PDF = ".pdf,.PDF" set GZ = ".gz,.GZ" complete gv "n/*/f:*{$PS,$PDF,$GZ}/" complete xv "n/*/f:*{$PICS}/" complete ghostview "n/*/f:*{$PS}/" complete acroread "n/*/f:*{$PDF}/" complete gunzip "p/1/f:*{$GZ}/" unset PICS unset PS unset GZ unset PDF # check spelling of commands # set correct = all umask 077 set filec # damn beep set nobeep # check that the .alias file is present before executing if (-f ~/.alias) then # check that the .alias file has no errors before sourcing it (source ~/.alias) >& /dev/null if (!($status)) then # this causes the aliases to take effect source ~/.alias endif endif # check that the .cshrc.local file is present before executing if (-f ~/.cshrc.local) then # check that the .cshrc.old file has no errors before sourcing it (source ~/.cshrc.local) >& /dev/null if (!($status)) then # run it. source ~/.cshrc.local endif endif