Mercurial > ec-dotfiles
annotate rc/cshrc @ 447:cc72aa61b633
Added hgignore.
author | Edho Arief <edho@myconan.net> |
---|---|
date | Tue, 22 Jan 2013 23:09:52 +0700 |
parents | c01d272af466 |
children | 072662ced8b8 |
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 | |
395
c01d272af466
Moved less configuration declaration to environment variable.
Edho Arief <edho@myconan.net>
parents:
341
diff
changeset
|
33 setenv LESS '-MRXgij15$nsz-2' |
0 | 34 setenv BLOCKSIZE K |
35 setenv LC_COLLATE C | |
36 setenv LANG en_US.UTF-8 | |
341
675590e84904
[rc/cshrc] Better LSCOLORS, prompt.
Edho Arief <edho@myconan.net>
parents:
332
diff
changeset
|
37 setenv LSCOLORS "gxfxcxdxbxegedabagacad" |
0 | 38 |
39 unset autologout | |
40 unset autoexpand | |
41 unset autolist | |
42 unset ignoreeof | |
43 | |
44 unalias \* | |
78
06fd72a78cc1
tcsh: remote desktop alias.
Edho Prima Arief <me@myconan.net>
parents:
74
diff
changeset
|
45 alias rd "rdesktop -g 1280x700 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5" |
0 | 46 alias h history 25 |
47 alias j jobs -l | |
48 alias la ls -A | |
49 alias ll ls -lA | |
50 alias ls ls -F | |
39 | 51 alias rm rm -i |
0 | 52 |
53 if ($?prompt) then | |
54 set gnuls_opts="--color=auto --group-directories-first -F" | |
55 set iscolor=0 | |
56 switch (${TERM}) | |
57 case xterm*: | |
58 case dtterm: | |
59 case screen*: | |
60 setenv CLICOLOR | |
61 set myhost=`hostname | cut -d '.' -f 1` | |
341
675590e84904
[rc/cshrc] Better LSCOLORS, prompt.
Edho Arief <edho@myconan.net>
parents:
332
diff
changeset
|
62 set prompt="[%{\033[0;33m%}%n%{\033[0m%}@%{\033[0;32m%}%m%{\033[0m%} %{\033[0;36m%}%c%{\033[0m%}]%# " |
0 | 63 alias mypwd 'printf "%s\n" "${PWD}" | sed -e "s#^${HOME}#~#"' |
64 alias precmd 'printf "\033]0;${USER}@${myhost}: %s\007" "`mypwd`"' | |
65 set iscolor=1 | |
66 breaksw | |
67 endsw | |
68 | |
69 if ("$TERM" == "screen") then | |
70 bindkey '\e[1~' beginning-of-line | |
71 bindkey '\e[3~' delete-char | |
72 bindkey '\e[4~' end-of-line | |
73 bindkey '\e[5~' history-search-backward | |
74 bindkey '\e[6~' history-search-forward | |
75 bindkey '\eOD' backward-word | |
76 bindkey '\eOC' forward-word | |
77 bindkey '\e\e[D' backward-word | |
78 bindkey '\e\e[C' forward-word | |
79 endif | |
80 bindkey "^W" backward-delete-word | |
81 bindkey -k up history-search-backward | |
82 bindkey -k down history-search-forward | |
83 endif | |
84 | |
85 switch (`uname -s`) | |
86 case FreeBSD: | |
87 set path=(${path} /usr/local/{bin,sbin}) | |
88 alias ls ls -FG | |
89 ( which gnuls ) > /dev/null && alias ls gnuls ${gnuls_opts} | |
90 alias man man -o | |
39 | 91 alias rm rm -I |
90
1057412834a5
[tcsh] cooler top for freebsd
Edho Prima Arief <edho@myconan.net>
parents:
80
diff
changeset
|
92 alias top top -P |
0 | 93 breaksw |
94 case NetBSD: | |
95 set path=(${path} /usr/pkg/{bin,sbin}) | |
96 breaksw | |
105 | 97 case OpenBSD: |
0 | 98 set path=(${path} /usr/local/{bin,sbin}) |
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 alias ls ls -FG | |
105 breaksw | |
106 case SunOS: | |
107 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
|
108 test -x /usr/gnu/bin/ls && alias ls /usr/gnu/bin/ls ${gnuls_opts} |
0 | 109 breaksw |
110 case Linux: | |
111 alias ls ls ${gnuls_opts} | |
112 alias grep grep --color=auto | |
113 breaksw | |
114 endsw | |
115 unset gnuls_opts | |
116 | |
33 | 117 ( which vim ) > /dev/null && alias vi vim && setenv EDITOR vim |
0 | 118 |
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
119 test -f "${HOME}/.ecos_tcsh.after" && source "${HOME}/.ecos_tcsh.after" |
80 | 120 |
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
121 test -x "/usr/games/fortune" && "/usr/games/fortune" |