(Modified 2010 Jul 14)
.cshrc
An example
I use the tcsh shell. The .cshrc file contains various customizations for this shell (and for the csh shell). Below, I go through the contents of mine, with explanations. The complete file is here. I took the leading dot out from the name, partly so that it would show up in the default directory listing, and partly so that I wouldn't accidentally overwrite mine if I downloaded it to my home directory.
The following is how I set my prompt:
set prompt = "%m %C2 %h%# "
m is the hostname (up to the first period)
C2 shows the parent/current directory
h shows the numbers in the history
# shows a greater-than sign for normal users, pound sign for root
The following turns on auto-correction.
set correct = cmd
With the following, if you hit TAB when an additional character is needed to break a tie, the possible completions will be listed.
set autolist=ambiguous
There is another autolist option where all possible completions are always listed when you hit TAB, which is annoying to me.
My history settings:
set history = 200 set savehist = 100 merge set histdup = erase
If I recall correctly:
set history = 200 saves up to the most recent 200 commands
set savehist = 100 merge combines the history from multiple windows
set histdup = erase removes duplicates from the history
The following sets my list of extra executable directories:
set path = ( \ . \ /home/tapu/local/spire_linux-1.5.3/bin \ /home/tapu/bin \ $path)
The backslashes are necessary to continue the list on a new line. The last $path appends the new entries to the existing list. There is an important distinction between the $path and $PATH; the former is space-delimited, and the latter is colon-delimited (source).
Some aliases:
alias brandeis 'ssh shaikh@shiva.rose.brandeis.edu' alias ll 'ls -l' alias ltr 'ls -ltr' alias ls 'ls -F --color=auto'
In the last one:
-F adds special characters to certain classes of entries, for example:
/ for directories
* for executables
@ for softlinks
--color=auto colors certain classes of files
Some SPIDER aliases and environmental variables:
setenv SPMAN_DIR "/home/tapu/local/spider/man/" setenv SPPROC_DIR "/home/tapu/local/spider/proc/" setenv SPBIN_DIR "/home/tapu/local/spider/bin/" alias spider /home/tapu/local/spider/bin/spider_linux setenv JWEB_DIR /home/tapu/local/web/jweb/linux setenv JAIHOME $JWEB_DIR/j2re1.4.2_06/lib setenv JWEBCLASSPATH $JWEB_DIR/linux.WEB.jar:$JAIHOME/mlibwrapper.jar:$JAIHOME/jai_core.jar:$JAIHOME/jai_codec.jar alias jweb '$JWEB_DIR/j2re1.4.2_06/bin/java -Xmx512m -Djava.util.prefs.syncInterval=2000000 web/StartWeb'
I didn't exhaustively describe everything in my template .cshrc, but most kinds of entries are described.
This page is Lynx-enhanced