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