# STDCSHRC # 'standard' cshrc file. Should be located in $STD/.stdcshrc, # perms rw-r--r-- root/sys, and sourced at top of user's ~/.cshrc: # # set STD=/usr/local/adm # if ( -r $STD/.stdcshrc) source $STD/.stdcshrc # # Set these before sourcing this file to disable certain defaults: # # set nostdprompt # disable default prompt # set nostdaliases # disable default aliases # set nostdshell # disable default shell settings # set nostdsoft # disable default 3rd party software setup # # erco@3dsite.com # MINIMAL PATH FOR COMMANDS THAT FOLLOW set path = ( /sbin /bin /usr/bin /usr/sbin /usr/bsd ) if ( ! $?HOSTNAME ) setenv HOSTNAME "`hostname`" if ( ! $?PLATFORM ) setenv PLATFORM "`uname -sr|sed 's/ /_/'`" # PLATFORM PATHS switch ( $PLATFORM ) case 'IRIX*': source $STD/.std_irix; breaksw; case 'Linux*': source $STD/.std_linux; breaksw; case 'SunOS*': source $STD/.std_sunos; breaksw; endsw # AVOID PERM PROBLEMS FOR NON-ROOT LOGINS switch ( "`/usr/bin/id`" ) # ROOT/SU LOGINS case '*uid=0(root)*': umask 022 breaksw # NORMAL LOGINS default: set path = ( . ~/bin $path ) umask 000 breaksw endsw # EASY PATH MODIFIERS if ( -x $STD/epath ) then alias addpath 'setenv PATH `echo $PATH|$STD/epath add \!*`' alias inspath 'setenv PATH `echo $PATH|$STD/epath ins \!*`' alias rmpath 'setenv PATH `echo $PATH|$STD/epath rm \!*`' alias optpath 'setenv PATH `echo $PATH|$STD/epath opt`' else alias addpath '';alias inspath '';alias rmpath '';alias optpath ''; endif ### NON-INTERATIVE LOGINS STOP HERE! ### if ( $?prompt == 0 ) exit ### CSH/TCSH SETUP ### 'WIDELY ACCEPTED' SHELL DEFAULTS if ( ! $?nostdshell ) then set filec = 1 # we love file completion set ignoreeof = 1 # so ^D won't logout set history = 100 # remember what we typed set savehist = 100 # save old history set mail = ( 60 /usr/mail/$USER ) # new mail checks unset autologout # dont logout automatically ### TCSH SPECIFIC SETTINGS if ( $?tcsh ) then set edit # command line editing set autolist # list choices for completion set visiblebell # avoid beeping when possible bindkey -v # vi mode default endif endif # 'WIDELY ACCEPTED' ALIASES # To disable, use 'set nostdaliases' in your # ~/.cshrc before the 'source $STD/.stdcshrc'. # if ( ! $?nostdaliases ) then alias dir 'ls -la' # for DOS folks alias h 'history' # history alias lc '/bin/ls -aCF' # list columns alias lt '/bin/ls -latF \!*|more' # list time alias ll '/bin/ls -laF' # list long alias lsd '/bin/ls -la \!*|grep ^d' # list dirs [ld(1) is linker!] alias lsdt '/bin/ls -lat \!*|egrep ^d|more'# ls directories by time alias lsx '/bin/ls -la \!*|grep ^...x' # list execs alias lsf '/bin/ls -la \!*|grep -v ^d|grep -v ^...x' # normal files alias lss '/bin/ls -la \!*| sort +4 -n | more' # list by size alias mail 'Mail' # enforce BSD mail alias so 'source' # source shortcut alias shome 'so ~/.cshrc;so ~/.login' # source home files alias vt100 'setenv TERM vt100' # vt100 tty alias whereis 'find . -name \!* -print' # recursive search for file endif # DEFAULT PROMPT # To disable, use 'set nostdprompt' in your # ~/.cshrc before your 'source $STD/.stdcshrc'. # if ( ! $?nostdprompt && -r $STD/.stdprompt ) source $STD/.stdprompt