cshrc file

来源:互联网 发布:建盏 知乎 编辑:程序博客网 时间:2024/05/18 02:07

###############################################################################
#                                                                             #
#         Example .cshrc file                                                 #
#                                                                             #
#         by Chris Taylor                                                     #
#                                                                             #
###############################################################################

# Set path shell variable
# (See description of path in the paragraph followin this example .cshrc)
set path = ( /usr/bin /usr/local /usr/local/bin /usr/bin/X11 /
             /usr/ucb /usr/opt/bin ~ )

# Don't overwrite existing files with the redirection character ">"
set noclobber

# Don't create core dump files when a program blows up.
limit coredumpsize 0

# Check to see if this is an interactive shell.
# If not, skip the rest of this file.
if ($?USER == 0 || $?prompt == 0) exit

## Set C shell variables
# Remember my 40 most recent events
set history=40

# Save the most recent 40 events when I log out
set savehist=40

# Substitute the filename to be completed when I type an <ESC> at
# the command line
set filec

# Tells the shell to ignore .o files when trying to complete filenames
# when filec is set.  (This doesn't hold if the .o file is the only
# on that could be completed.
set fignore=.o

# Tells "filec" not to cry if it can't complete a file.
set nobeep

# Notify me when the status of background jobs change
set notify

# Don't let me log out by pressing <ctrl-d>
set ignoreeof

# Set TTY shell variable equal to the current terminal name
set TTY=`who am i | awk '{print $2}'`

# Allow others to send messages directly to my terminal
mesg y


# Set prompt to have the following form: [cmd#]cpu[directory]:
set cpu=`hostname | awk '{FS = "."; print $1}'` # set cpu = computer name
alias sp      set prompt='/[!/]$cpu/[$cwd/]:/ ' # set sp to set the prompt
alias cd      'chdir /!* ; sp'                  # redefine cd command
alias pd      'pushd /!* ; sp'                  # redefine pd command
alias pp      'popd /!* ; sp'                   # redefine pp command
sp                                              # set the prompt

# Shortcut aliases
alias c       'clear'
alias dict    'vi /usr/dict/words'
alias gv      'ghostview'
alias h       'history !* | head -39 | more'
alias laser   'lpr -Pmsa13 -h'
alias line    'lpr -Ped3'
alias ll      'ls -la'
alias ls      'ls -x'
alias mine    'chmod og-rwx'
alias pwd     'echo $cwd'       # This is faster than executing the pwd command
alias safe    'chmod a-w'
alias tmp     'cd /tmp/taylor'

# end of .cshrc file

 

 

 

web links:

http://www.unl.csi.cuny.edu/tutorials/viunix/subsubsection3_3_6_1.html#SECTION0003610000000000000

 

 

 

原创粉丝点击