Mercurial > ec-dotfiles
annotate rc/cshrc @ 592:902e74024e54
Update openbsd tmux version
author | nanaya <me@myconan.net> |
---|---|
date | Tue, 08 Nov 2016 17:09:49 +0900 |
parents | 77c1f9e624a3 |
children |
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. |
533
77c1f9e624a3
Rename prefix to `.ec.` instead of `.ecos_`.
edogawaconan <me@myconan.net>
parents:
501
diff
changeset
|
14 if ( ! $?ec_tcsh_loaded ) then |
77c1f9e624a3
Rename prefix to `.ec.` instead of `.ecos_`.
edogawaconan <me@myconan.net>
parents:
501
diff
changeset
|
15 set ec_tcsh_loaded="yes" |
243 | 16 else |
17 exit | |
18 endif | |
19 | |
533
77c1f9e624a3
Rename prefix to `.ec.` instead of `.ecos_`.
edogawaconan <me@myconan.net>
parents:
501
diff
changeset
|
20 test -f "${HOME}/.ec.tcsh.before" && source "${HOME}/.ec.tcsh.before" |
0 | 21 umask 22 |
22 limit coredumpsize 0 | |
23 | |
24 set prompt="[%B%n@%m %~%b]%# " | |
533
77c1f9e624a3
Rename prefix to `.ec.` instead of `.ecos_`.
edogawaconan <me@myconan.net>
parents:
501
diff
changeset
|
25 set path=({,/usr}/{bin,sbin} "${HOME}"/{,.ec.}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 |
501 | 52 alias tmux tmux -f ~/.tmux-1.3.conf |
0 | 53 |
54 if ($?prompt) then | |
55 set gnuls_opts="--color=auto --group-directories-first -F" | |
56 set iscolor=0 | |
57 switch (${TERM}) | |
58 case xterm*: | |
59 case dtterm: | |
60 case screen*: | |
61 setenv CLICOLOR | |
62 set myhost=`hostname | cut -d '.' -f 1` | |
341
675590e84904
[rc/cshrc] Better LSCOLORS, prompt.
Edho Arief <edho@myconan.net>
parents:
332
diff
changeset
|
63 set prompt="[%{\033[0;33m%}%n%{\033[0m%}@%{\033[0;32m%}%m%{\033[0m%} %{\033[0;36m%}%c%{\033[0m%}]%# " |
0 | 64 alias mypwd 'printf "%s\n" "${PWD}" | sed -e "s#^${HOME}#~#"' |
65 alias precmd 'printf "\033]0;${USER}@${myhost}: %s\007" "`mypwd`"' | |
66 set iscolor=1 | |
67 breaksw | |
68 endsw | |
69 | |
70 if ("$TERM" == "screen") then | |
71 bindkey '\e[1~' beginning-of-line | |
72 bindkey '\e[3~' delete-char | |
73 bindkey '\e[4~' end-of-line | |
74 bindkey '\e[5~' history-search-backward | |
75 bindkey '\e[6~' history-search-forward | |
76 bindkey '\eOD' backward-word | |
77 bindkey '\eOC' forward-word | |
78 bindkey '\e\e[D' backward-word | |
79 bindkey '\e\e[C' forward-word | |
80 endif | |
81 bindkey "^W" backward-delete-word | |
82 bindkey -k up history-search-backward | |
83 bindkey -k down history-search-forward | |
84 endif | |
85 | |
86 switch (`uname -s`) | |
87 case FreeBSD: | |
88 set path=(${path} /usr/local/{bin,sbin}) | |
89 alias ls ls -FG | |
90 ( which gnuls ) > /dev/null && alias ls gnuls ${gnuls_opts} | |
91 alias man man -o | |
39 | 92 alias rm rm -I |
90
1057412834a5
[tcsh] cooler top for freebsd
Edho Prima Arief <edho@myconan.net>
parents:
80
diff
changeset
|
93 alias top top -P |
0 | 94 breaksw |
95 case NetBSD: | |
96 set path=(${path} /usr/pkg/{bin,sbin}) | |
97 breaksw | |
105 | 98 case OpenBSD: |
0 | 99 set path=(${path} /usr/local/{bin,sbin}) |
244
b6b9a47de016
Turns out solaris doesn't have [
Edho Arief <edho@myconan.net>
parents:
243
diff
changeset
|
100 test "${iscolor}" -eq 1 && setenv TERM xterm-256color |
105 | 101 ( which colorls ) > /dev/null && alias ls colorls -FG |
0 | 102 breaksw |
103 case DragonFly: | |
104 set path=(${path} /usr/pkg/{bin,sbin}) | |
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 |
533
77c1f9e624a3
Rename prefix to `.ec.` instead of `.ecos_`.
edogawaconan <me@myconan.net>
parents:
501
diff
changeset
|
120 test -f "${HOME}/.ec.tcsh.after" && source "${HOME}/.ec.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" |