Example .cshrc File for CSCI 3308
Over the years, the default .cshrc file for accounts in the CSEL lab have evolved, such that different people have very different contents in their .cshrc file. These differences have caused problems in previous CSCI 3308 classes, when a lab or program references a part of the .cshrc file that some students do not possess. As such, I'm including an example layout for a .cshrc file that has been tested on computers in the CSEL lab. If you encounter problems with your .cshrc file over the course of the semester, feel free to create a new .cshrc file based on the content below. You will then be back at a “safe” place and can then incrementally add commands to this file to get back to where you need to be.
If you have any questions about the commands below, send mail to Ken Anderson or the TA.
##### An example .cshrc file for CSCI 3308 for use in the CSEL #####
#
# This file (.cshrc) is run every time you spawn a tcsh shell.
# This includes every time you open a new Terminal window
# (as this action spawns a new shell)
#
####################################################################
#
# Set the ARCH environment variable before setting the path;
# This allows you to add architecture-specific directories
# to your path
if (! $?ARCH) then
setenv ARCH `/usr/local/bin/arch`
endif
if (! $?UNAME) then
setenv UNAME `uname`
endif
set packages = ( netscape gcc-3.3 j2sdk Acrobat mathematica news )
setenv MANPATH /tools/cs/man
set pathadd = ""
foreach p ( $packages )
if ( -d /tools/cs/$p ) then
set pathadd = ( $pathadd /tools/cs/$p/bin )
setenv MANPATH ${MANPATH}:/tools/cs/$p/man
endif
end
if ( -d /usr/share/man ) then
setenv MANPATH ${MANPATH}:/usr/share/man
else
setenv MANPATH ${MANPATH}:/usr/man
endif
# first merge $path and $pathadd
set path = ( $pathadd $path )
# then get rid of pathadd variable
unset pathadd
# now add additional paths
set path = ( $HOME/bin $path )
setenv MANPATH ${MANPATH}:/usr/local/man:/usr/local/X11/man
# basic info about the host/user
if (! $?USER) then
setenv USER `whoami`
endif
if (! $?HOST) then
setenv HOST `hostname`
endif
# Set the editor to use (usually vi).
setenv EDITOR vi
setenv PAGER less
# how many commands to keep in the history database
set history = 200
set savehist = 800 merge
# standard csh features
set filec # enable filename completion
set notify # report status of background jobs immediately
set noclobber # don't clobber existing files
set nomatch # not an error if '*' matches nothing
# tcsh-specific features
if ($?tcsh != 0) then
set prompt="[%m:%c3] %n % "
limit coredumpsize 1k
unset autologout # don't log me off after a set idle time
set echo_style both # emulate bsd and sysV /bin/echo's
set addsuffix # / on dir during file name completion
set ampm # show times in 12 hr. format
set autolist # list possibilities for file name completion
set autoexpand # expand history automatically with
endif
# Some useful Aliases.
alias ls "ls -F"
alias rm "rm -i"
alias mv "mv -i"
alias cp "cp -i"
# Unalias some non-useful aliases
unalias l.
unalias ll
unalias mc