-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc-mine
573 lines (454 loc) · 18 KB
/
.zshrc-mine
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
export PATH="/usr/lib/ccache/bin:$PATH:/home/totycro/bin:/usr/sbin:/sbin:/usr/local/sbin:/usr/local/bin:/usr/bin:/sbin:/bin"
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH:/home/totycro/node_modules/.bin"
export MAVEN_OPTS="-Xmx1024M -Xss128M -XX:MaxPermSize=1024M -XX:+CMSClassUnloadingEnabled -XX:-UseGCOverheadLimit"
alias pav=pavucontrol
export FLUX_FORWARD_NAMESPACE=flux
alias cal="ncal -C" # otherwise today is not highlighted?
alias kbu="kubectl -n 0c0a0ef4-8d0d-4e70-b002-033c7cbb41fd"
alias kbp="kubectl -n eb7fa88c-36a4-4b5f-959f-c7869d5acda8"
function kb-cycle() {
set -x
kb delete -f $1
kb apply -f $1
set +x
}
function watch-pods() {
NS=$1
POD_PARTIAL=$2
watch kubectl get po -n $NS \| grep $POD_PARTIAL
}
# sourcery https://unix.stackexchange.com/a/25329/462277
alias watch='watch '
alias watch5='watch -n 5 '
alias watch100='watch -n 100 '
alias watchd='watch -d '
function enter_loose() {
export KUBECONFIG=/home/mallinger/.kube/loose-mundi-kubeconfig.json
export PS1="%F{6}[loose-mundi]%f ${PS1}"
}
function k3s_fenrir() {
export KUBECONFIG=/home/mallinger/.kube/config-fenrir-k3s
export PS1="%F{6}[k3s]%f ${PS1}"
}
function enter_k3s() {
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
export PS1="%F{6}[k3s]%f ${PS1}"
}
function enter_mhub_test_k3d() {
export KUBECONFIG=/home/mallinger/.kube/config-mhub-test-k3d
export PS1="%F{6}[mhub-test-k3d]%f ${PS1}"
}
function enter_vnext() {
export KUBECONFIG=/home/mallinger/.kube/config-vnext
export PS1="%F{6}[vnext]%f ${PS1}"
}
#function enter_k3d() {
# export KUBECONFIG=/home/mallinger/.kube/config-k3d
# export PS1="%F{6}[k3d]%f ${PS1}"
#}
function eoepca_dev() {
export KUBECONFIG=/home/mallinger/.kube/config-eoepca-dev
export PS1="%F{6}[eoepca-dev]%f ${PS1}"
}
function eoepca_demo() {
export KUBECONFIG=/home/mallinger/.kube/config-eoepca-demo
export PS1="%F{6}[eoepca-demo]%f ${PS1}"
}
function enter_minikube() {
export KUBECONFIG=/home/mallinger/.kube/config-minikube
export PS1="%F{6}[minikube]%f ${PS1}"
}
# not active now
# function enter_eoxhub_v2() {
# export KUBECONFIG=/home/mallinger/.kube/config-eoxhub-v2
# export PS1="%F{6}[eoxhub-v2]%f ${PS1}"
# }
# not active right now?
# function enter_deepesdl() {
# export KUBECONFIG=/home/mallinger/.kube/config-deepesdl
# export PS1="%F{6}[deepesdl]%f ${PS1}"
# }
function enter_deepesdl_prod() {
export KUBECONFIG=/home/mallinger/.kube/config-deepesdl-prod
export PS1="%F{6}[deepesdl-prod]%f ${PS1}"
}
function enter_hub_test_core() {
export KUBECONFIG=/home/mallinger/.kube/config-hub-test-core
export PS1="%F{6}[hub-test]%f ${PS1}"
}
function enter_hub_core_PROD() {
export KUBECONFIG=/home/mallinger/.kube/config-hub-core-prod
export PS1="%F{6}[hub-core-prod]%f ${PS1}"
}
function enter_hub_dev_core() {
export KUBECONFIG=/home/mallinger/.kube/config-hub-dev
export PS1="%F{6}[hub-dev]%f ${PS1}"
}
function enter_dafm() {
export KUBECONFIG=/home/mallinger/.kube/config-agri-dafm-core
export PS1="%F{6}[agri-dafm-core]%f ${PS1}"
}
function enter_osc() {
export KUBECONFIG=/home/mallinger/.kube/config-osc
export PS1="%F{6}[osc]%f ${PS1}"
}
function enter_ama() {
export KUBECONFIG=/home/mallinger/.kube/config-agri-ama
export PS1="%F{6}[agri-ama]%f ${PS1}"
}
function enter_eotdl_terabyte() {
export KUBECONFIG=/home/mallinger/.kube/kubeconfig-eotdl.json
export PS1="%F{6}[eotdl-terabyte]%f ${PS1}"
}
function enter_eotdl_otc() {
export KUBECONFIG=/home/mallinger/.kube/kubeconfig-otc-eotdl.json
export PS1="%F{6}[eotdl-otc]%f ${PS1}"
}
function kbe() {
set -x
NAMESPACE=$1
POD_NAME=$2
COMMAND=${3:-bash}
CONTAINER=${4}
if [ -n "${CONTAINER}" ] ; then
CONTAINER="-c ${CONTAINER}"
fi
kubectl -n "$NAMESPACE" exec -it ${=CONTAINER} `kubectl -n "$NAMESPACE" get po -o name | grep "$POD_NAME" | fzf --select-1 --exit-0` -- $COMMAND
set +x
}
function kbd() {
set -x
NAMESPACE=$1
POD_NAME=$2
kubectl -n "$NAMESPACE" describe `kubectl -n "$NAMESPACE" get po -o name | grep "$POD_NAME" | fzf --select-1 --exit-0 `
set +x
}
function kbl() {
set -x
NAMESPACE=$1
POD_NAME=$2
CONTAINER_NAME=$3
kubectl -n "$NAMESPACE" logs --tail=1000 -f `kubectl -n "$NAMESPACE" get po -o name | grep "$POD_NAME" | fzf --select-1 --exit-0 ` $CONTAINER_NAME
set +x
}
function kbld() {
set -x
NAMESPACE=$1
DEPLOYMENT_NAME=$2
kubectl -n "$NAMESPACE" logs --tail=1000 --all-containers=true -f `kubectl -n "$NAMESPACE" get deployment -o name | grep "$DEPLOYMENT_NAME" | fzf --select-1 --exit-0 `
set +x
}
function kbllatest() {
set -x
NAMESPACE=$1
CONTAINER_NAME=$2
LATEST_POD=$(kubectl -n "$NAMESPACE" get pod --sort-by=.metadata.creationTimestamp -o name | tail -n1 )
kubectl -n "$NAMESPACE" logs --tail=1000 -f ${LATEST_POD} $CONTAINER_NAME
}
function kb-nodes() {
kubectl get node -o custom-columns=NAME:.metadata.name,NODE-OTC:.metadata.labels.cce\\.cloud\\.com/cce-nodepool,NODE-AWS:.metadata.labels.eks\\.amazonaws\\.com/nodegroup,INSTANCE-TYPE:.metadata.labels.node\\.kubernetes\\.io/instance-type,NODE:.metadata.labels.node-lifecycle,CREATION:.metadata.creationTimestamp --sort-by=.metadata.creationTimestamp
}
function kb-pods-on-node() {
kubectl get pods --all-namespaces --no-headers --field-selector spec.nodeName=$1
}
alias decode_secret_json="jq '.data | map_values(@base64d)'"
alias -g k8s-sort-created="--sort-by=.metadata.creationTimestamp"
alias -g SC="--sort-by=.metadata.creationTimestamp"
function cdd() {
set -x
cd "$(find . -type d -iname "*${1}*" -print | fzf --select-1 --exit-0)"
}
alias pav="pavucontrol"
alias stream_youtube="kodi-cmd.sh play_youtube"
alias ls="eza --git"
alias ll="eza -l --git"
alias cat="batcat"
alias vim="nvim"
alias dotfiles-git='/usr/bin/git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'
alias docker-images-by-size="docker images --format '{{.Size}}\t{{.Repository}}\t{{.Tag}}\t{{.ID}}' | sed 's/ //' | sort -h | column -t"
alias docker-images-by-size-remove-command="docker-images-by-size | awk '{print \$2,\":\",\$3} ' | sed 's/ : /:/' | while read i ; do echo \"docker image rm \$i\" ; done"
alias gpuflux="git push && fluxctl sync"
#cd ~/wc/dist/local ; source setup.sh >/dev/null ; cd - > /dev/null
export PYTHONSTARTUP="$HOME/.pythonrc.py"
fignore=( .o .pyc ) # extensions to ignore concerning auto compl.
setopt CLOBBER # overwrite file if output is redirected into file
setopt AUTO_PARAM_SLASH # Make directories pretty.
setopt CHASE_LINKS # if you pwd from a symlink, you get the actual path
setopt autocd # cd without cd
setopt correctall # correct typos
setopt hashlistall # keep all commands in hash
setopt nobgnice # run forked processes with same niceness
setopt nohup # don't kill background jobs when exiting
setopt completeinword # auto completition also starting from end of word
setopt automenu # sounds good - doesn't work
setopt auto_list # list ambiguous completition entries automatically
setopt interactivecomments # allow comments with '#' in interactive shells
setopt shortloops
setopt vi # no explanation...
setopt append_history
setopt BAD_PATTERN
setopt EXTENDED_HISTORY
setopt HIST_FIND_NO_DUPS
setopt INC_APPEND_HISTORY
#setopt SHARE_HISTORY
#setopt printexitvalue
bindkey '^R' history-incremental-search-backward
# http://chneukirchen.org/blog/archive/2013/03/10-fresh-zsh-tricks-you-may-not-know.html
nbsp=$'\u00A0'
bindkey -s $nbsp '^u'
autoload -U promptinit # colorful prompts
promptinit
prompt sorintotycro
setopt prompt_subst # Enable parameter expansion, command substitution, and arithmetic expansion in the prompt
#setopt transient_rprompt # only show the rprompt on the current prompt
autoload -U compinit
compinit
autoload -U url-quote-magic # automatically quote '?' and '=' within urls
zle -N self-insert url-quote-magic
#setopt extendedglob
# DEACTIVATED: because: "eix ^qt$" doesn't work with it
# ^ for negation: ls ^file
# <200-300> range of integers
# (a|b)
# *.c~foo.c not foo.c
# (r) readable, write, exec
# (.) plain file
# (U) my files
zstyle ':completion:*:*:cd:*' tag-order local-directories
zstyle ':completion:*:*:lp*:*' tag-order jobs
zstyle ':completion:*:*:(kill|wait):*' tag-order 'jobs processes'
zstyle ':completion:*:*:(kill|wait):*' group-order jobs
# wtf is this? limits completion..
#zstyle ':completion:*' use-compctl false
zstyle ':completion:*:match:*' original only
zstyle ':completion:incremental:*' list yes
zstyle ':completion:incremental:*' prompt 'incremental (%c): %u%s%a %l'
zstyle ':completion:*:oldlist:*' menu verbose
zstyle ':completion:predict:*' completer _complete
zstyle ':completion:predict:*' list always
zstyle ':completion:predict:*' cursor key
zstyle ':completion:predict:*' special-dirs yes
zstyle ':completion:*:default' menu yes select
zstyle ':completion:*:*:xdvi:*' file-sort time
zstyle ':completion:*:rm:*' ignore-line yes
zstyle ':completion:*:apt-get:*' ignore-line yes
zstyle ':completion:*:(correct|approximate):*' max-errors 2 numeric
zstyle ':completion:*:(correct|approximate)-*:*' original yes
zstyle ':completion:*:paths' expand prefix
zstyle ':completion:*:option(-*|s)' auto-description 'specify %d'
zstyle ':completion:*:processes' command ps --forest -u $EUID -o pid,cmd
zstyle ':completion:*' verbose yes
zstyle ':completion:*' prefix-needed yes
zstyle ':completion:*' prefix-hidden no
zstyle ':completion:*' last-prompt yes
zstyle ':completion:*' users totycro root
zstyle ':completion:*:*:*:users' ignored-patterns \
adm apache bin daemon games gdm halt ident junkbust lp mail mailnull \
named news nfsnobody nobody nscd ntp operator pcap postgres radvd \
rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs backup bind \
dictd gnats identd irc man messagebus postfix proxy sys www-data
zstyle ':completion:*:complete:*:(local|path)-directories' ignored-patterns '(|*/)CVS'
zstyle ':completion:*:functions' ignored-patterns '_*'
zstyle ':completion:*:cd:*' ignore-parents parent pwd
zstyle ':completion:*:cd:*' ignored-patterns '(*/)#lost+found'
zstyle ':completion:*' group-name ''
zstyle ':completion:*:jobs' prefix-needed no
zstyle ':completion:*' ignore-parents pwd parent
zstyle ':jompletion:*:complete:*:(functions|parameters|association-keys)' ignored-patterns '_*'
zstyle ':completion:::::' completer _complete _match _ignored _correct _approximate _prefix
zstyle ':completion:*' matcher-list '' 'm:{a-z-}={A-Z_} r:|[-_./]=* r:|=*' 'm:{a-z-}={A-Z_} l:|=* r:|=*'
zstyle ':completion:*:*:diff:*:version' command =diff -v
zstyle ':completion:*:*:(p|gview|xdvi|kill|psnup):*' menu yes select
zstyle ':completion:*' file-sort name
zstyle ':completion:*:*:(p|gview|xdvi|psnup|pdflatex|acroread|xpdf):*' file-sort time
zstyle ':completion:*:default' list-prompt 'Line %l Continue? %b'
zstyle ':completion:*:default' select-prompt 'Match %m Line %l %p %b'
zstyle ':completion:*:(cp|mv|rm):*' ignore-line yes
zstyle ':completion:*:kill:*' force-list always
#zstyle ':completion:*:*:*make:*:targets' command awk \''/^[a-zA-Z0-9][^\/\t=]+:/ {print $1}'\' \$file
zstyle ':completion:*history*' remove-all-dups yes
zstyle ':completion:*history*' stop yes
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.zsh/cache
zstyle ':completion:*:*:ogg123:*' file-patterns '*.(ogg|OGG):ogg\ files *(-/):directories'
zstyle ':completion:*:*:xine:argument-rest:*' file-patterns '%p|*.m3u(-.):globbed-files *(-/):directories' '*:all-files'
compdef _mplayer xine
compdef _screen sc
zstyle ':completion:*:*:wine:*' file-patterns '*.exe: *(-/):directories'
zstyle ':completion:*:*:cedega:*' file-patterns '*.exe: *.EXE: *.Exe: *(-/):directories'
zstyle ':completion:*:*:mid:*' file-patterns '*.mid: *.MID: *.kar: *.KAR: *(-/):directories'
#zstyle ':completion:*:*:btc:*' file-patterns '*.torrent: *(-/):directories'
# allow one error for every three characters typed in approximate completer
zstyle -e ':completion:*:approximate:*' max-errors \
'reply=( $(( ($#PREFIX+$#SUFFIX)/3 )) numeric )'
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
zstyle ':completion:*' group-name ''
ff () {
find . -iname "*$1*"
}
grepr () {
DIR=$2
if [ -z "$DIR" ] ; then
DIR="."
fi
grep -riIn "$1" "$DIR" | grep -v "\.svn"
}
export LESSCOLOR=yes
alias calc="noglob _calc"
function _calc () {
awk "BEGIN { print $* ; }"
}
kalc() {
zmodload zsh/mathfunc
print $(( $@ ))
}
function mycalc () {
# spaces in $@ are interpreted as EOF
python3 -c "print($@)"
}
alias yt="kodi-cmd.sh play_youtube"
alias gd="git diff"
alias gl="git log"
alias gs="git status"
alias gco="git checkout"
alias gso="git show"
alias git_clean_branches='git branch -r --merged | grep -vE "origin/main|origin/master|origin/HEAD" | cut -d'/' -f2- | while read br; do echo "git push --delete origin \"$br\"" ; done'
# new mpd
# ncmpcpp doesn't seem to work without host, mpc does
alias ncm="ncmpcpp"
#alias mpc="MPD_HOST=$(/home/totycro/bin/get_mpd_host.sh) mpc"
alias '?=noglob _calc'
alias urxvt-large-font="urxvt -fn \"xft:Dejavu Sans Mono:size=11:style=book\" -fb \"xft:Dejavu Sans Mono:size=11:style=bold\""
alias urxvt-medium-font="urxvt -fn \"xft:Dejavu Sans Mono:size=10:style=book\" -fb \"xft:Dejavu Sans Mono:size=10:style=bold\""
alias mkdir="nocorrect mkdir"
alias sudo="nocorrect sudo" # http://unix.stackexchange.com/questions/34390/zsh-wants-to-correct-vim-to-vim
alias sl="ls"
alias sp="sudo pacman"
alias sps="sudo pacman -Ss"
alias pdflatex="pdflatex -file-line-error"
alias ses="setup_screens.sh"
alias w3m_html="w3m -T text/html"
alias tempdir="cd $(mktemp -d)"
#eval_helper () { bc -l|perl -pe 's/(\.[^0]+)0+$|\.0+$/$1/'; }
alias mn="mvn -o -T4"
alias qp=qpdfview
alias p="ping"
alias lf="leo -fr"
alias li="leo -it"
alias le="leo -es"
alias v="vim"
alias setup_gtcad="cd ~/wc/dist/local && source setup.sh && cd -"
alias m_v="make VERBOSE=1" # works with cmake
#alias note="cat >/dev/null"
#alias l='/home/totycro/code/cpp/dict/build/dict'
# alias l='/home/totycro/bin/leo'
# alias rtorrent='really_nice rtorrent'
alias sq3='sqlite3'
function note_old() {
file=$(tempfile --prefix=note_)
echo "pasting to ${file}"
cat > $file
}
function note() {
if [ -z "$1" ] ; then echo "Specify note name"; return; fi
file="${HOME}/notes/$(date +'%Y-%m-%d')-$1"
echo "Opening new note file ${file}"
vim "${file}"
}
#new
#alias other_screen="DISPLAY=192.168.0.101:0"
#alias mcc_other_screen="mcc v -display 192.168.0.101:0"
#alias world_up_pretend='emerge -DNpvu world'
#alias world_up='sudo emerge -DNvu --keep-going -1 world'
alias sqlite3='sqlite3 -header -column'
alias revdep-rebuild="really_nice revdep-rebuild --no-order"
#alias kdev4="kdeinit4 2>/dev/null& kbuildsycoca4 & sleep 1; kdevelop-4"
#alias kdev4="kdeinit4 2>/dev/null; kbuildsycoca4 ; kdevelop-4"
#alias tuxguitar="aoss tuxguitar"
function mkcd () { mkdir -p "$@" && eval cd "\"\$$#\""; }
alias tovid_my='tovid -dvd -ffmpeg -pal -abitrate 384'
alias bc='bc -ql'
alias gdb='gdb -silent'
alias -g rn=really_nice
alias -g nice2=really_nice
alias -g really_nice='nice -n 19 ionice -c 3'
alias mpc_file="mpc --format \"%file%\""
# alias cal='cal -m'
#alias kdevelop3="export KDEDIRS="$KDEDIRS:/usr" && kbuildsycoca && /usr/kde/3.5/bin/kdevelop"
#alias kdevelop="echo \"kde-messages are hidden\";kdeinit 2>/dev/null& kbuildsycoca & sleep 1; kdevelop 2>/dev/null"
#alias suw="really_nice sudo /home/totycro/bin/update-world-dev"
#alias cplay='cplay-dev'
alias -g B="|cat"
alias -g By="|cat --language yaml"
alias -g L="|less"
#alias -g V="|view -"
alias -g G="|grep --colour=auto"
alias -g S="|sort -g"
alias -g T="|tail"
alias -g V="|nvim"
alias ccache_stats="CCACHE_DIR=/var/tmp/ccache ccache -s"
alias ccache_stats_watch="CCACHE_DIR=/var/tmp/ccache watch --interval 2 ccache -s"
#middle-age
#wien: alias ctw="ctw AUXX0025"
#oö: alias ctw="ctw AUXX0003"
alias ctw="ctw AUXX0025"
#alias se="really_nice sudo emerge "
#alias sef="EMERGE_DEFAULT_OPTS=\"`source /etc/make.conf && echo "$EMERGE_DEFAULT_OPTS"|sed -e 's/--ask//g'`\" sudo emerge"
alias lwc='TeXcount.pl'
#old
alias mm='mplayer -af volume=-200 -osdlevel 0 -subfont-text-scale 2 -subfont-osd-scale 2'
#very old
alias m='make'
#alias ll='ls -lh'
alias cp='nocorrect cp -i'
alias mv='nocorrect mv -i'
# alias ls='ls -F --dereference-command-line-symlink-to-dir'
alias top='top -d 1'
alias mx="alsamixer"
alias c='clear && ';
alias cls='clear && ls';
#if [ "$PS1" ] ; then
#
# if [ -d /sys/fs/cgroup ] ; then
# cdir=/sys/fs/cgroup
# else
# cdir=/dev/cgroup
# fi
# mkdir -p -m 0700 $cdir/user/$$ > /dev/null 2>&1
# /bin/echo $$ > $cdir/user/$$/tasks
# /bin/echo '1' > $cdir/user/$$/notify_on_release
# unset -v cdir
#fi
zstyle ':completion:*:*:ok:*' file-patterns '*.(pdf|PDF|ps|PS|djvu|pdf.gz):pdf\ files *(-/):directories'
zstyle ':completion:*:*:qpdfview:*' file-patterns '*.(pdf|PDF): *(-/):directories'
#compctl -/ -g "*.pdf *.ps " ok
#compctl -/ -g "*.pdf" qpdfview
function mccCompl() {
ls | while read f ; do
if `file --mime "$f" | egrep -q "audio/|video/"`; then
echo -n $f
fi
done
echo
}
#compctl -/ -K mccCompl mcc
PATH="/home/totycro/perl5/bin${PATH+:}$PATH"; export PATH;
PERL5LIB="/home/totycro/perl5/lib/perl5${PERL5LIB+:}$PERL5LIB"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/home/totycro/perl5${PERL_LOCAL_LIB_ROOT+:}$PERL_LOCAL_LIB_ROOT"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/home/totycro/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/home/totycro/perl5"; export PERL_MM_OPT;
# quote pasted URLs
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
#/usr/bin/virtualenvwrapper.sh
export MCFLY_KEY_SCHEME=vim
# export MCFLY_FUZZY=true
export MCFLY_RESULTS=45
export MCFLY_INTERFACE_VIEW=BOTTOM
eval "$(mcfly init zsh)"
eval "$(zoxide init zsh)"
eval "$(stern --completion zsh)"