contents of file "~/.tcshrc"
# in the beginning
set user_tcshrc="$HOME/.tcshrc.user"
#in the end
if (-r "${user_tcshrc}") then
source "${user_tcshrc}"
endif
contents of the file "~/.tcshrc.user"
set cn = "%{e[0m%}" # default color and form setting
set cr = "%{e[31m%}"
set cp = "%{e[4;35m%}" # 4 for underline text
set cg = "%{e[1;32m%}" # 1 for brighter color
set prompt = "$cg%B%U%h %b%u$cg%U[%~]%u$cn "
# %B (%b): start (end) boldfacing mode %B,%b can be used in pair, or it may influence next setting
# %U (%u): start (end) underline mode %U,%u can be used in pair, or it may influence next setting
# %n: the user name
# @: show @ itself
# %m: hostname up to the first dot "."
# %M: the full hostname
# %~: the full working directory
# %h: history number of command
:<<!
the color settings:
1: brighter color
4: underline text
5: flashing text
foreground background color
30 40 black
31 41 red
32 42 green
33 43 yellow
34 44 blue
35 45 purple
36 46 cyan
37 47 white(grey)
!
alias g 'gvim'
alias .. 'cd ..'
alias - 'cd -'
alias la 'ls -al'
alias checkout 'source ../../xxx.csh' # "" and '' are both correct
alias cd 'cd !* ; ls' # ls while cd to the very directory
# setenv 设置全局变量,可以传递给子shell,类似于bash中的export;
# set 设置局域变量,不能传递给子shell,而当同时使用set和setenv来设置同一个变量时,当前进程中,会优先使用set设置的值,所以要注意使用
set prompt = "$cg%B%U%h %b%u$cg%U[%~]%u$cn " # shown as follows
NOTE: after being modified, don't forget to 'source' it
---------------------------------------------
Study needs record, record needs review
---------------------------------------------