Mercurial > ec-dotfiles
annotate tcsh @ 44:1f1af28f36e9
[bash] Bashrc, c-style ifdef.
author | Edho Prima Arief <me@myconan.net> |
---|---|
date | Wed, 27 Apr 2011 21:15:16 +0700 |
parents | 3a9d39d8805b |
children | 54a82956bb11 |
rev | line source |
---|---|
0 | 1 #!/usr/bin/env tcsh |
25
e0b9a89a559d
Support for "before" script.
Edho Prima Arief <me@myconan.net>
parents:
17
diff
changeset
|
2 [ -e "${HOME}/.tcsh_init.before" ] && source "${HOME}/.tcsh_init.before" |
0 | 3 umask 22 |
4 limit coredumpsize 0 | |
5 | |
6 set prompt="[%B%n@%m %~%b]%# " | |
17 | 7 set path=({,/usr}/{bin,sbin} "${HOME}"/{,.ecos.}bin) |
0 | 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 h history 25 | |
26 alias j jobs -l | |
27 alias la ls -A | |
28 alias ll ls -lA | |
29 alias ls ls -F | |
39 | 30 alias rm rm -i |
0 | 31 |
32 if ($?prompt) then | |
33 set gnuls_opts="--color=auto --group-directories-first -F" | |
34 set iscolor=0 | |
35 switch (${TERM}) | |
36 case xterm*: | |
37 case dtterm: | |
38 case screen*: | |
39 setenv CLICOLOR | |
40 set myhost=`hostname | cut -d '.' -f 1` | |
41 set prompt="[%{\033[0;33m%}%n%{\033[0m%}@%{\033[0;32m%}%m%{\033[0m%} %{\033[1;34m%}%c%{\033[0m%}]%# " | |
42 alias mypwd 'printf "%s\n" "${PWD}" | sed -e "s#^${HOME}#~#"' | |
43 alias precmd 'printf "\033]0;${USER}@${myhost}: %s\007" "`mypwd`"' | |
44 set iscolor=1 | |
45 breaksw | |
46 endsw | |
47 | |
48 if ("$TERM" == "screen") then | |
49 bindkey '\e[1~' beginning-of-line | |
50 bindkey '\e[3~' delete-char | |
51 bindkey '\e[4~' end-of-line | |
52 bindkey '\e[5~' history-search-backward | |
53 bindkey '\e[6~' history-search-forward | |
54 bindkey '\eOD' backward-word | |
55 bindkey '\eOC' forward-word | |
56 bindkey '\e\e[D' backward-word | |
57 bindkey '\e\e[C' forward-word | |
58 endif | |
59 bindkey "^W" backward-delete-word | |
60 bindkey -k up history-search-backward | |
61 bindkey -k down history-search-forward | |
62 endif | |
63 | |
64 switch (`uname -s`) | |
65 case FreeBSD: | |
66 set path=(${path} /usr/local/{bin,sbin}) | |
67 setenv LSCOLORS ExGxFxdxCxegedabagExEx | |
68 alias ls ls -FG | |
69 ( which gnuls ) > /dev/null && alias ls gnuls ${gnuls_opts} | |
70 alias man man -o | |
39 | 71 alias rm rm -I |
0 | 72 breaksw |
73 case NetBSD: | |
74 set path=(${path} /usr/pkg/{bin,sbin}) | |
75 breaksw | |
76 case OpenBSD: | |
77 set path=(${path} /usr/local/{bin,sbin}) | |
78 [ "${iscolor}" -eq 1 ] && setenv TERM xterm-256color | |
79 breaksw | |
80 case DragonFly: | |
81 set path=(${path} /usr/pkg/{bin,sbin}) | |
82 setenv LSCOLORS ExGxFxdxCxegedabagExEx | |
83 alias ls ls -FG | |
84 breaksw | |
85 case SunOS: | |
86 set path=(${path} /usr/{gnu,csw,xpg4}/{bin,sbin}) | |
87 [ -x /usr/gnu/bin/ls ] && alias ls /usr/gnu/bin/ls ${gnuls_opts} | |
88 breaksw | |
89 case Linux: | |
90 alias ls ls ${gnuls_opts} | |
91 alias grep grep --color=auto | |
92 breaksw | |
93 endsw | |
94 unset gnuls_opts | |
95 | |
33 | 96 ( which vim ) > /dev/null && alias vi vim && setenv EDITOR vim |
0 | 97 |
25
e0b9a89a559d
Support for "before" script.
Edho Prima Arief <me@myconan.net>
parents:
17
diff
changeset
|
98 [ -e "${HOME}/.tcsh_init.after" ] && source "${HOME}/.tcsh_init.after" |