мой сегодняшний конфиг tcsh

  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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
#!/bin/sh
#########################.cshrc - 10/10/05######################################
# ver 1.1
if ( `id -u` == 0 ) set root
#
# #######################
# # ##### GENERAL ##### #
# #######################
#
umask 022
#
limit coredumpsize 0
limit -h coredumpsize 0
#
# #####################################
# # ##### ENVIRONMENT VARIABLES ##### #
# #####################################
#
setenv LS_COLORS 'no=01;37:fi=01;37:di=01;34:ln=01;36:pi=01;32:so=01;35:do=01;35:bd=01;33:cd=01;33:ex=01;31:mi=00;05;37:or=00;05;37:'
setenv PAGER 'less'
#setenv EDITOR 'vim'
setenv EDITOR 'mcedit'
setenv VISUAL "${EDITOR}"
# setenv LANG ru_RU.KOI8-R
#
# ###############################
# # ##### SHELL VARIABLES ##### #
# ###############################
#
if ( $?tcsh ) then
bindkey "^W" backward-delete-word
bindkey -k up history-search-backward
bindkey -k down history-search-forward
endif
set color
set filec
set rmstar
set dunique
set autolist
set ellipsis
set dextract
set addsuffix
set noclobber
set autoexpand
set autocorrect
set pushdsilent
set pushdtohome
set printexitvalue
set history = 5000
set savehist = 5000
#set histdup = all
set histdup = erase
set savedirs = 5000
set correct = all
set listjobs = long
set echo_style = both
set symlinks = chase
set inputmode = insert
set matchbeep = ambiguous
set promptchars = '%#'
set listflags = 'A'
set watch = (0 any any)
set who = "%n(`whoami`) has %a %l from %M"
unset {histfile,dirsfile,autologout,implicitcd}
#
# #######################
# # ##### ALIASES ##### #
# #######################
#
alias vnc-start "vncserver -geometry 1280x800 -depth 16 -interface 10.8.121.157 :1"
alias vnc-restart "vncserver -kill :1; vnc-start"
alias _ssh_onyx "ssh -p 55522 kfin.dyndns.org"
alias _openvpn_onyxd "ip r d 192.168.7.0/24;screen -dmS openvpn_to_onyx openvpn --config /f/openvpn/openvpn.ovpn"
alias _openvpn_onyx "ip r d 192.168.7.0/24;screen -S openvpn_to_onyx openvpn --config /f/openvpn/openvpn.ovpn"
alias _openvpn_onyxa "screen -dr openvpn_to_onyx"
alias _ping "ping kfin.dyndns.org"
#alias ssh_onyx "ssh onyx"
alias sshonyx_vpn "ssh onyx.vpn"
alias sshfreews_vpn "ssh freews.vpn"
alias sshisquid_vpn "ssh isquid.vpn"
#alias tail "/home/allc/.tail.sh"
alias logedit "_e ~/.cshrc"
alias mtr "mtr -t"
alias code "mp3unicode -s windows-1251 -1 none -2 unicode *.mp3"
alias dfu "df -h |grep /usr"
alias ping "ping -a"
alias ss "sudo su"
alias df 'df -h'
alias rmssh 'rm -i .ssh/known_hosts'
alias x 'exit'
alias p "${PAGER}"
alias e 'exit'
alias _e "${EDITOR}"
alias .. 'cd ..'
alias ... 'cd ../..'
alias - 'cd ~'
# alias c 'clear'
# alias h 'history'
# alias hc 'history -c'
alias mu 'make update'
alias mic 'make install clean'
alias mcl 'make clean'
alias ll 'ls -GFAql'
alias lf 'ls -GF'
alias ls 'ls -GF'
#alias mfloppy 'mount /dev/floppy /mnt/floppy'
#alias umfloppy 'umount /mnt/floppy'
#alias mdvdrom 'mount /mnt/dvdrom'
#alias umdvdrom 'umount /mnt/dvdrom'
#alias mcdrom 'mount /mnt/cdrom'
#alias umcdrom 'umount /mnt/cdrom'
alias psa 'ps aux'
alias psu 'ps ux'
alias lpsa "ps aux \!* | p"
alias lpsu "ps ux \!* | p"
alias dub 'du -sclb'
alias duk 'du -sclk'
alias dum 'du -sclm'
alias dfk 'df -PTak'
alias dfm 'df -PTam'
alias dfh 'df -PTah'
alias ds 'display'
alias dmesg 'dmesg | p'
if ( ${?root} ) then
alias efstab 'e /etc/fstab'
alias exconf 'e /etc/X11/xorg.conf'
alias ldebug 'p /var/log/debug'
alias lfaillog 'p /var/log/faillog'
alias lmessages 'p /var/log/messages'
alias lsecure 'p /var/log/secure'
alias lsyslog 'p /var/log/syslog'
alias lxorg 'p /var/log/Xorg.0.log'
endif
unalias {beepcmd,cwdcmd,jobcmd,helpcommand,periodic,precmd,postcmd,shell}
#
# ###########################
# # ##### COMPLETIONS ##### #
# ###########################
#
complete mount \
'n/-t/(4.2 4.3 adfs affs autofs bdev coda coherent cramfs devpts efs ext ext2 ext3 hfs hpfs iso9660 jfs mfs minix msdos ncpfs nfs ntfs pipefs proc qnx4 ramfs reiserfs romfs rootfs S51K S52K shm smbfs sockfs sysv tmp tmpfs udf ufs umsdos usbfs usbdevfs vfat xenix xfs xiafs)/' \
'n/-o/(async atime auto defaults dev exec _netdev noatime noauto nodev noexec nosuid nouser remount ro rw suid sync dirsync user users)/' \
'n/-O/(async atime auto defaults dev exec _netdev noatime noauto nodev noexec nosuid nouser remount ro rw suid sync dirsync user users)/' \
'p/*/f/' \
'p/*/d/'
complete find \
'n/-anewer/f/' \
'n/-cnewer/f/' \
'n/-group/g/' \
'n/-ilname/f/' \
'n/-iname/f/' \
'n/-ipath/f/' \
'n/-iregex/f/' \
'n/-lname/f/' \
'n/-name/f/' \
'n/-newer/f/' \
'n/-path/f/' \
'n/-regex/f/' \
'n/-type/(b c d p f l s D)/' \
'n/-user/u/' \
'n/-xtype/(b c d p f l s D)/' \
'n/-exec/c/' \
'n/-fls/f/' \
'n/-fprint/f/' \
'n/-fprint0/f/' \
'n/-fprintf/f/' \
# 'n/-ok/c/' \
'c/--/(help version)/' \
'c/-/(daystart depth follow help maxdepth mindepth mount noleaf version xdev amin anewer atime cmin cnewer ctime empty false fstype gid group ilname iname inum ipath iregex links lname mmin mtime name newer nouser nogroup path perm regex size true type uid used user xtype exec fls fprint fprint0 fprintf ok print print0 printf prune ls)/' \
'n/-fstype/(4.2 4.3 adfs affs autofs bdev coda coherent cramfs devpts efs ext ext2 ext3 hfs hpfs iso9660 jfs mfs minix msdos ncpfs nfs ntfs pipefs proc qnx4 ramfs reiserfs romfs rootfs S51K S52K shm smbfs sockfs sysv tmp tmpfs udf ufs umsdos usbfs usbdevfs vfat xenix xfs xiafs)/' \
'p/*/d/'
complete {mkfs,fsck} 'n/-t/(4.2 4.3 adfs affs autofs bdev coda coherent cramfs devpts efs ext ext2 ext3 hfs hpfs iso9660 jfs mfs minix msdos ncpfs nfs ntfs pipefs proc qnx4 ramfs reiserfs romfs rootfs S51K S52K shm smbfs sockfs sysv tmp tmpfs udf ufs umsdos usbfs usbdevfs vfat xenix xfs xiafs)/'
complete {man,where,which,whatis,sudo,info,apropos} 'p/*/c/'
complete kill 'c/-/S/' 'n/-s/S/' 'c/%/j/' 'p/*/(%)/'
complete qmake 'n/-o/(Makefile)/' 'p/*/f:*.pro/'
complete {cat,pico,vi,vim,view,emacs} 'p/*/f/'
complete {{,un}setenv,printenv,env} 'p/*/e/'
complete {fg,bg,stop} 'c/%/j/' 'p/*/(%)/'
complete {,un}alias 'p/*/c/' 'p/*/a/'
complete {cd,pushd,{ch,mk,rm}dir} 'p/*/d/'
complete {finger,pinky} 'p/*/u/'
complete {,un}complete 'p/1/X/'
complete {,un}set 'p/*/s/'
#
# ##############################
# ##### PROMPT SECTION ##### #
# ##############################
#
# set color_name = '%{^[[ color_code m%}'
setenv GREP_OPTIONS '--color=auto'#; export GREP_OPTIONS
setenv GREP_COLOR '1;31'#; export GREP_COLOR
set rgb_restore = '%{^[[00m%}'
set rgb_black = '%{^[[00;30m%}'
set rgb_firebrick = '%{^[[00;31m%}'
set rgb_red = '%{^[[01;31m%}'
set rgb_forest = '%{^[[00;32m%}'
set rgb_green = '%{^[[01;32m%}'
set rgb_brown = '%{^[[00;33m%}'
set rgb_yellow = '%{^[[01;33m%}'
set rgb_navy = '%{^[[00;34m%}'
set rgb_blue = '%{^[[01;34m%}'
set rgb_purple = '%{^[[00;35m%}'
set rgb_magenta = '%{^[[01;35m%}'
set rgb_cadet = '%{^[[00;36m%}'
set rgb_cyan = '%{^[[01;36m%}'
set rgb_gray = '%{^[[00;37m%}'
set rgb_white = '%{^[[01;37m%}'
set rgb_std = "${rgb_white}"
# set rgb_pr = "${rgb_yellow}"
set rgb_pr = "${rgb_cyan}"
if ( ${?root} ) then
set rgb_usr = "${rgb_red}"
set rgb_hostname="${rgb_usr}[${rgb_pr}%m${rgb_usr}]"
else
set rgb_usr = "${rgb_navy}"
# set rgb_usr = "${rgb_blue}"
# set rgb_usr = "${rgb_yellow}"
# set rgb_usr = "${rgb_green}"
# set rgb_usr = "${rgb_forest}"
# set rgb_usr = "${rgb_firebrick}"
set rgb_hostname="[${rgb_pr}%m${rgb_usr}]"
endif
# if ( ${?prompt} ) set prompt="${rgb_green}(%T) [%l] ${rgb_usr}`whoami`@%m${rgb_std} %c2${rgb_usr}%#\n${rgb_green}>${rgb_restore} "
# if ( ${?prompt} ) set prompt="${rgb_green}(%T) [%l] ${rgb_pr}%m${rgb_std} %/${rgb_usr}%#\n%#${rgb_green}>${rgb_restore} "
if ( ${?prompt} ) set prompt="${rgb_usr}(%T) ${rgb_hostname}${rgb_std} %/${rgb_usr}%#\n%#${rgb_green}>${rgb_restore} "
unset rgb_*
#
# #############################################
# # ##### SOURCE/LOAD - DIRECTORY STACK ##### #
# #############################################
#
set usr_cwd = "`pwd`" # most WMs open terminals in specific locations therefore note the current working directory
#dsl # source/load the directory stack, if present ... this usually changes the current working directory
cd "${usr_cwd}" # 'cd' back to the initial/original working directory and push it onto the directory stack
unset usr_cwd # cleanup
#
# #######################
# # ##### THE END ##### #
# #######################
#
if ( ${?root} ) unset root