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