Mercurial > ec-dotfiles
annotate rc/cshrc @ 381:bb6ea516f312
Merge commit '61bf33d' into rhel5
| author | Edho Arief <edho@myconan.net> |
|---|---|
| date | Tue, 24 Jul 2012 17:56:24 -0400 |
| parents | 675590e84904 |
| children | c01d272af466 |
| 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 | |
|
341
675590e84904
[rc/cshrc] Better LSCOLORS, prompt.
Edho Arief <edho@myconan.net>
parents:
332
diff
changeset
|
36 setenv LSCOLORS "gxfxcxdxbxegedabagacad" |
| 0 | 37 |
| 38 unset autologout | |
| 39 unset autoexpand | |
| 40 unset autolist | |
| 41 unset ignoreeof | |
| 42 | |
| 43 unalias \* | |
|
78
06fd72a78cc1
tcsh: remote desktop alias.
Edho Prima Arief <me@myconan.net>
parents:
74
diff
changeset
|
44 alias rd "rdesktop -g 1280x700 -K -a 16 -z -P -r sound:off -r clipboard:CLIPBOARD -5" |
| 0 | 45 alias h history 25 |
| 46 alias j jobs -l | |
| 47 alias la ls -A | |
| 48 alias ll ls -lA | |
| 49 alias ls ls -F | |
| 39 | 50 alias rm rm -i |
| 0 | 51 |
| 52 if ($?prompt) then | |
| 53 set gnuls_opts="--color=auto --group-directories-first -F" | |
| 54 set iscolor=0 | |
| 55 switch (${TERM}) | |
| 56 case xterm*: | |
| 57 case dtterm: | |
| 58 case screen*: | |
| 59 setenv CLICOLOR | |
| 60 set myhost=`hostname | cut -d '.' -f 1` | |
|
341
675590e84904
[rc/cshrc] Better LSCOLORS, prompt.
Edho Arief <edho@myconan.net>
parents:
332
diff
changeset
|
61 set prompt="[%{\033[0;33m%}%n%{\033[0m%}@%{\033[0;32m%}%m%{\033[0m%} %{\033[0;36m%}%c%{\033[0m%}]%# " |
| 0 | 62 alias mypwd 'printf "%s\n" "${PWD}" | sed -e "s#^${HOME}#~#"' |
| 63 alias precmd 'printf "\033]0;${USER}@${myhost}: %s\007" "`mypwd`"' | |
| 64 set iscolor=1 | |
| 65 breaksw | |
| 66 endsw | |
| 67 | |
| 68 if ("$TERM" == "screen") then | |
| 69 bindkey '\e[1~' beginning-of-line | |
| 70 bindkey '\e[3~' delete-char | |
| 71 bindkey '\e[4~' end-of-line | |
| 72 bindkey '\e[5~' history-search-backward | |
| 73 bindkey '\e[6~' history-search-forward | |
| 74 bindkey '\eOD' backward-word | |
| 75 bindkey '\eOC' forward-word | |
| 76 bindkey '\e\e[D' backward-word | |
| 77 bindkey '\e\e[C' forward-word | |
| 78 endif | |
| 79 bindkey "^W" backward-delete-word | |
| 80 bindkey -k up history-search-backward | |
| 81 bindkey -k down history-search-forward | |
| 82 endif | |
| 83 | |
| 84 switch (`uname -s`) | |
| 85 case FreeBSD: | |
| 86 set path=(${path} /usr/local/{bin,sbin}) | |
| 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}) |
|
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
98 test "${iscolor}" -eq 1 && setenv TERM xterm-256color |
| 105 | 99 ( which colorls ) > /dev/null && alias ls colorls -FG |
| 0 | 100 breaksw |
| 101 case DragonFly: | |
| 102 set path=(${path} /usr/pkg/{bin,sbin}) | |
| 103 alias ls ls -FG | |
| 104 breaksw | |
| 105 case SunOS: | |
| 106 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
|
107 test -x /usr/gnu/bin/ls && alias ls /usr/gnu/bin/ls ${gnuls_opts} |
| 0 | 108 breaksw |
| 109 case Linux: | |
| 110 alias ls ls ${gnuls_opts} | |
| 111 alias grep grep --color=auto | |
| 112 breaksw | |
| 113 endsw | |
| 114 unset gnuls_opts | |
| 115 | |
| 33 | 116 ( which vim ) > /dev/null && alias vi vim && setenv EDITOR vim |
| 0 | 117 |
|
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
118 test -f "${HOME}/.ecos_tcsh.after" && source "${HOME}/.ecos_tcsh.after" |
| 80 | 119 |
|
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
120 test -x "/usr/games/fortune" && "/usr/games/fortune" |
