Mercurial > ec-dotfiles
annotate rc/tcsh @ 293:0f46455257be
More!
author | Edho Arief <edho@myconan.net> |
---|---|
date | Thu, 09 Feb 2012 00:12:13 +0700 |
parents | f74212d79fcb |
children | 3a0bd37d37c0 |
rev | line source |
---|---|
0 | 1 #!/usr/bin/env tcsh |
241
443e0004a708
[tcsh] Ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents:
127
diff
changeset
|
2 |
245 | 3 # Ensures it's tcsh |
4 if ( ! $?tcsh ) then | |
5 exit | |
6 endif | |
7 | |
241
443e0004a708
[tcsh] Ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents:
127
diff
changeset
|
8 # Ensures this script is running on terminal. Otherwise exit immediately. |
443e0004a708
[tcsh] Ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents:
127
diff
changeset
|
9 if ( ! $?prompt ) then |
443e0004a708
[tcsh] Ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents:
127
diff
changeset
|
10 exit |
443e0004a708
[tcsh] Ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents:
127
diff
changeset
|
11 endif |
443e0004a708
[tcsh] Ensures interactive terminal.
Edho Arief <edho@myconan.net>
parents:
127
diff
changeset
|
12 |
243 | 13 # Ensures we're not loading this script again. |
14 if ( ! $?ecos_tcsh_loaded ) then | |
15 set ecos_tcsh_loaded="yes" | |
16 else | |
17 exit | |
18 endif | |
19 | |
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
20 test -f "${HOME}/.ecos_tcsh.before" && source "${HOME}/.ecos_tcsh.before" |
0 | 21 umask 22 |
22 limit coredumpsize 0 | |
23 | |
24 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
|
25 set path=({,/usr}/{bin,sbin} "${HOME}"/{,.ecos_}bin) |
0 | 26 set history=1000 |
27 set savehist=1000 | |
28 set nobeep | |
29 set filec | |
30 | |
31 setenv EDITOR vi | |
32 setenv PAGER less | |
33 setenv BLOCKSIZE K | |
34 setenv LC_COLLATE C | |
35 setenv LANG en_US.UTF-8 | |
36 | |
37 unset autologout | |
38 unset autoexpand | |
39 unset autolist | |
40 unset ignoreeof | |
41 | |
42 unalias \* | |
78
06fd72a78cc1
tcsh: remote desktop alias.
Edho Prima Arief <me@myconan.net>
parents:
74
diff
changeset
|
43 alias rd "rdesktop -g 1280x700 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5" |
0 | 44 alias h history 25 |
45 alias j jobs -l | |
46 alias la ls -A | |
47 alias ll ls -lA | |
48 alias ls ls -F | |
39 | 49 alias rm rm -i |
0 | 50 |
51 if ($?prompt) then | |
52 set gnuls_opts="--color=auto --group-directories-first -F" | |
53 set iscolor=0 | |
54 switch (${TERM}) | |
55 case xterm*: | |
56 case dtterm: | |
57 case screen*: | |
58 setenv CLICOLOR | |
59 set myhost=`hostname | cut -d '.' -f 1` | |
60 set prompt="[%{\033[0;33m%}%n%{\033[0m%}@%{\033[0;32m%}%m%{\033[0m%} %{\033[1;34m%}%c%{\033[0m%}]%# " | |
61 alias mypwd 'printf "%s\n" "${PWD}" | sed -e "s#^${HOME}#~#"' | |
62 alias precmd 'printf "\033]0;${USER}@${myhost}: %s\007" "`mypwd`"' | |
63 set iscolor=1 | |
64 breaksw | |
65 endsw | |
66 | |
67 if ("$TERM" == "screen") then | |
68 bindkey '\e[1~' beginning-of-line | |
69 bindkey '\e[3~' delete-char | |
70 bindkey '\e[4~' end-of-line | |
71 bindkey '\e[5~' history-search-backward | |
72 bindkey '\e[6~' history-search-forward | |
73 bindkey '\eOD' backward-word | |
74 bindkey '\eOC' forward-word | |
75 bindkey '\e\e[D' backward-word | |
76 bindkey '\e\e[C' forward-word | |
77 endif | |
78 bindkey "^W" backward-delete-word | |
79 bindkey -k up history-search-backward | |
80 bindkey -k down history-search-forward | |
81 endif | |
82 | |
83 switch (`uname -s`) | |
84 case FreeBSD: | |
85 set path=(${path} /usr/local/{bin,sbin}) | |
86 setenv LSCOLORS ExGxFxdxCxegedabagExEx | |
87 alias ls ls -FG | |
88 ( which gnuls ) > /dev/null && alias ls gnuls ${gnuls_opts} | |
89 alias man man -o | |
39 | 90 alias rm rm -I |
90
1057412834a5
[tcsh] cooler top for freebsd
Edho Prima Arief <edho@myconan.net>
parents:
80
diff
changeset
|
91 alias top top -P |
0 | 92 breaksw |
93 case NetBSD: | |
94 set path=(${path} /usr/pkg/{bin,sbin}) | |
95 breaksw | |
105 | 96 case OpenBSD: |
0 | 97 set path=(${path} /usr/local/{bin,sbin}) |
105 | 98 setenv LSCOLORS ExGxFxdxCxegedabagExEx |
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
99 test "${iscolor}" -eq 1 && setenv TERM xterm-256color |
105 | 100 ( which colorls ) > /dev/null && alias ls colorls -FG |
0 | 101 breaksw |
102 case DragonFly: | |
103 set path=(${path} /usr/pkg/{bin,sbin}) | |
104 setenv LSCOLORS ExGxFxdxCxegedabagExEx | |
105 alias ls ls -FG | |
106 breaksw | |
107 case SunOS: | |
108 set path=(${path} /usr/{gnu,csw,xpg4}/{bin,sbin}) | |
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
109 test -x /usr/gnu/bin/ls && alias ls /usr/gnu/bin/ls ${gnuls_opts} |
0 | 110 breaksw |
111 case Linux: | |
112 alias ls ls ${gnuls_opts} | |
113 alias grep grep --color=auto | |
114 breaksw | |
115 endsw | |
116 unset gnuls_opts | |
117 | |
33 | 118 ( which vim ) > /dev/null && alias vi vim && setenv EDITOR vim |
0 | 119 |
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
120 test -f "${HOME}/.ecos_tcsh.after" && source "${HOME}/.ecos_tcsh.after" |
80 | 121 |
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
122 test -x "/usr/games/fortune" && "/usr/games/fortune" |