-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tcshrc
151 lines (133 loc) · 4.31 KB
/
.tcshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
set prompt = '[%B%n@%M:%/%b]\t%Y-%W-%D %P\n%h%# '
set history = 5000
set savehist = (5000 merge)
set historydup = erase
set autolist = ambiguos
set rmster
set color
set nobeep
set showdots
set filec
set correct = cmd
set listjobs
set notify
set cdpath = (~/)
set LANG = en_US.UTF-8
alias where "command -v"
alias screen "screen screen -U"
alias tmux "tmux -u"
alias grep "grep --color=auto"
alias ls "ls-F"
setenv LESS '--tabs=4 --no-init --LONG-PROMPT --ignore-case'
setenv EDITOR vim
setenv LSCOLORS gxFxcxdxbxegedacagacad
setenv LS_COLORS 'di=36:ln=35:so=32:pi=33:ex=32:bd=46;34:cd=43;34:su=41;30:sg=46;30:tw=42;30:ow=43;30'
#### Completions ############################################################
set complete=1 #tcsh の補完機能をオンにするスイッチ
complete {egcs,cxx,cc,gcc,g++} 'c/-[IL]/d/' \
'n/-c/f:*.{c,c++,C,cc,cpp}/' \
'c/-l/f:*.a/' \
'n/*/f:*.{c,c++,C,cc,cpp,f,o}/' \
'c/-/"(o l c g v L I D U W O2 static undef)"/'
complete {f77,g77} 'c/-[IL]/d/' \
'n/-c/f:*.f/' \
'p/*/f:*.[fco]/'
complete make 'p/1/(all clean distclean depend \
install install.man Makefiles buildworld installworld)/'
complete glade 'n/*/f:*.{glade,gld}/'
complete javac 'n/*/f:*.java/'
complete tmake 'n/-o/f:Makefile/' \
'n/*/f:*.pro/'
complete gdb 'n/-d/d/' 'n/*/c/'
complete ar 'c/[dmpqrtx]/"(c l o u v a b i)"/' 'p/1/"(d m p q r t x)"//' \
'p/2/f:*.a/ p/*/f:*.o/'
complete perl 'n/-S/c/'
# Compress
complete lha 'n/*/f:*.{lzh,LZH}/'
complete unzip 'p/*/f:*.{ZIP,zip}/'
complete gzip 'n/-d/f:*.{gz,Z,tgz,TGZ}/' \
'n/*/f:^*.{gz,Z,tgz,TGZ}/'
complete {gunzip,gzcat,zcat} 'n/*/f:*.{gz,Z,tgz,TGZ}/'
complete com{,press} 'n/*/f:^*.Z/'
complete unc{,ompress} 'n/*/f:*.Z/'
#complete tar 'n/*/f:*.{gz,Z,tar.gz,tgz,TGZ,tar.bz2}/'
# Tex
complete {*latex,'tex2*'} 'n/*/f:*.{tex,TEX,texi,ltx}/'
complete {ghostview,'gv*'} 'c/-l/(andscape)/' \
'n/*/f:*.{ps,eps,pdf}/'
complete {dvi*,x*dvi} 'n/*/f:*.{dvi,DVI}/'
# Edit
complete {gnuplot,gp} 'n/*/f:*.{plt,gp}/'
complete 'ps\*' 'n/*/f:*.{ps,eps,PS,EPS}/'
complete {gs,gv,ghostview} 'n/*/f:*.{ps,PS,eps,epsi,epsf,pdf,PDF}/'
complete {acroread,xpdf} 'n/*/f:*.{pdf,PDF}/'
complete 'tgif*' 'n/*/f:*.obj/'
complete {vi,xvi,m,more} 'n/*/f:^*.{o,a,so,so.*}/'
# Browse
complete {netscape,Mo,Mosaic,lynx,Lynx,w3m} \
'n/*/f:*.{htm,html}/'
# Misc tools
complete {x11,free}amp 'n/*/f:*.{mp3,MP3}/'
# complete vncviewer 'p/1/$hostnames/:'
# Job
complete ps 'n/-*u/u/'
complete {fg,bg,stop} 'c/%/j/ p/1/"(%)"//'
# Env
complete complete 'p/1/X/'
complete uncomplete 'n/*/X/'
complete alias 'p/1/a/'
complete unalias 'n/*/a/'
complete set 'c/*=/f/' 'p/1/s/=' 'n/=/f/'
complete unset 'n/*/s/'
complete env 'p/1/e/='
complete envg 'p/1/e/'
complete {set,print}env 'p/1/e/'
complete unsetenv 'n/*/e/'
complete xhost 'c/*{+,-}/$hostnames/'\
'p/*/$hostnames/'
complete xon 'c/*@/$hostnames/' \
'n/-l/u/' 'C/*/$hostnames/'
# Admin
#complete su 'c/--/"(login fast preserve-environment command shell help version)"/' \
# 'c/-/"(f l m p c s -)"/' \
# 'n/{-c,--command}/c/' \
# 'n@{-s,--shell}@'`cat /etc/shells`'@' 'n/*/u/'
# Daily command
complete {cd,chdir,pushd,popd,pu,po} \
'p/1/d/' \
'n/-*/d/'
complete rmdir 'n/*/d/'
complete [r,s]{sh,login,l} 'c/*@/$hostnames/' \
'n/-l/u/' 'C/*/$hostnames/' \
'p/1/\$hostnames/' \
'c/-/"(l n)"/' \
'N/-l/c/' \
'n/-/c/' \
'p/2/c/' \
'p/*/f/'
complete [r,s]{cp} 'c/*@/$hostnames/:' 'n/-l/u/'
complete *ftp 'p/*/$hostnames/'
complete {,j}{man,whatis} 'n/-M/d/' \
'n/*/c/'
complete {which,where,sudo,strace,exec,trace} \
'p/1/c/'
complete {finger,[M,m]ail,mailx} \
'c/*@/$hostnames/' 'p/1/u/@'
complete {nslookup,host,telnet,ping,traceroute}\
'p/*/$hostnames/'
complete find 'c/-/(print name type)/'
complete find 'n/-name/f/' \
'n/-type/(c b d f p l s)/' \
'n/-exec/c/' \
'c/-/(name type user size ctime mtime atime print exec )/' \
'n/*/d/'
complete chgrp 'p/*/g/'
complete chown 'p/*/u/'
# complete kill 'c/-/`kill -l`/'
# complete killall 'c/-/`kill -l`/' 'p/*/c/'
complete kill 'p/*/`ps ax | awk \{print\ \$1\}`/'
# Remove
complete rm 'c/--/"(directory force interactive verbose recursive help version)"/' \
# 'c/-/"(d f i v r R -)"/' \
'n/*/f:^*.{c,cc,C,h,in,tex}/' # Protect precious files
set hostnames = ( localhost )