comparison rc/tcsh @ 138:f963d52c031a

Merge.
author Edho Arief <edho@myconan.net>
date Wed, 02 Nov 2011 22:12:16 +0700
parents a7484f2c9616
children 443e0004a708
comparison
equal deleted inserted replaced
137:983beb13c736 138:f963d52c031a
1 #!/usr/bin/env tcsh
2 [ -e "${HOME}/.ecos_tcsh.before" ] && source "${HOME}/.ecos_tcsh.before"
3 umask 22
4 limit coredumpsize 0
5
6 set prompt="[%B%n@%m %~%b]%# "
7 set path=({,/usr}/{bin,sbin} "${HOME}"/{,.ecos_}bin)
8 set history=1000
9 set savehist=1000
10 set nobeep
11 set filec
12
13 setenv EDITOR vi
14 setenv PAGER less
15 setenv BLOCKSIZE K
16 setenv LC_COLLATE C
17 setenv LANG en_US.UTF-8
18
19 unset autologout
20 unset autoexpand
21 unset autolist
22 unset ignoreeof
23
24 unalias \*
25 alias rd "rdesktop -g 1280x700 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5"
26 alias h history 25
27 alias j jobs -l
28 alias la ls -A
29 alias ll ls -lA
30 alias ls ls -F
31 alias rm rm -i
32
33 if ($?prompt) then
34 set gnuls_opts="--color=auto --group-directories-first -F"
35 set iscolor=0
36 switch (${TERM})
37 case xterm*:
38 case dtterm:
39 case screen*:
40 setenv CLICOLOR
41 set myhost=`hostname | cut -d '.' -f 1`
42 set prompt="[%{\033[0;33m%}%n%{\033[0m%}@%{\033[0;32m%}%m%{\033[0m%} %{\033[1;34m%}%c%{\033[0m%}]%# "
43 alias mypwd 'printf "%s\n" "${PWD}" | sed -e "s#^${HOME}#~#"'
44 alias precmd 'printf "\033]0;${USER}@${myhost}: %s\007" "`mypwd`"'
45 set iscolor=1
46 breaksw
47 endsw
48
49 if ("$TERM" == "screen") then
50 bindkey '\e[1~' beginning-of-line
51 bindkey '\e[3~' delete-char
52 bindkey '\e[4~' end-of-line
53 bindkey '\e[5~' history-search-backward
54 bindkey '\e[6~' history-search-forward
55 bindkey '\eOD' backward-word
56 bindkey '\eOC' forward-word
57 bindkey '\e\e[D' backward-word
58 bindkey '\e\e[C' forward-word
59 endif
60 bindkey "^W" backward-delete-word
61 bindkey -k up history-search-backward
62 bindkey -k down history-search-forward
63 endif
64
65 switch (`uname -s`)
66 case FreeBSD:
67 set path=(${path} /usr/local/{bin,sbin})
68 setenv LSCOLORS ExGxFxdxCxegedabagExEx
69 alias ls ls -FG
70 ( which gnuls ) > /dev/null && alias ls gnuls ${gnuls_opts}
71 alias man man -o
72 alias rm rm -I
73 alias top top -P
74 breaksw
75 case NetBSD:
76 set path=(${path} /usr/pkg/{bin,sbin})
77 breaksw
78 case OpenBSD:
79 set path=(${path} /usr/local/{bin,sbin})
80 setenv LSCOLORS ExGxFxdxCxegedabagExEx
81 [ "${iscolor}" -eq 1 ] && setenv TERM xterm-256color
82 ( which colorls ) > /dev/null && alias ls colorls -FG
83 breaksw
84 case DragonFly:
85 set path=(${path} /usr/pkg/{bin,sbin})
86 setenv LSCOLORS ExGxFxdxCxegedabagExEx
87 alias ls ls -FG
88 breaksw
89 case SunOS:
90 set path=(${path} /usr/{gnu,csw,xpg4}/{bin,sbin})
91 [ -x /usr/gnu/bin/ls ] && alias ls /usr/gnu/bin/ls ${gnuls_opts}
92 breaksw
93 case Linux:
94 alias ls ls ${gnuls_opts}
95 alias grep grep --color=auto
96 breaksw
97 endsw
98 unset gnuls_opts
99
100 ( which vim ) > /dev/null && alias vi vim && setenv EDITOR vim
101
102 [ -e "${HOME}/.ecos_tcsh.after" ] && source "${HOME}/.ecos_tcsh.after"
103
104 [ -x "/usr/games/fortune" ] && "/usr/games/fortune"