cshrc的设置实例
##### 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
setenv USER alfred//设置环境变量
setenv PATH /proj/scripts/bin:$PATH//增加环境变量文件夹
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
alias cd 'cd !*; ll -color'
浙公网安备 33010602011771号