annotate rc/tcsh @ 138:f963d52c031a

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