-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
569 lines (490 loc) · 19.1 KB
/
.zshrc
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
#!/bin/false
#blabla
# |_)
# _` | | | _` | __|
# ( | | | ( |\__ \
# \__,_|_|_|\__,_|____/
## colors
red="\e[31m"
blue="\e[34m"
default="\e[0m"
## systemd alias
user_commands=(
list-units is-active status show help list-unit-files
is-enabled list-jobs show-environment cat list-timers
)
sudo_commands=(
start stop reload restart try-restart isolate kill
reset-failed enable disable reenable preset mask unmask
link load cancel set-environment unset-environment
edit
)
for c in $user_commands; do; alias sc-$c="systemctl $c"; done
for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done
for c in $user_commands; do; alias scu-$c="systemctl --user $c"; done
for c in $sudo_commands; do; alias scu-$c="systemctl --user $c"; done
alias sc-enable-now="sc-enable --now"
alias sc-disable-now="sc-disable --now"
alias sc-mask-now="sc-mask --now"
alias scu-enable-now="scu-enable --now"
alias scu-disable-now="scu-disable --now"
alias scu-mask-now="scu-mask --now"
## enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
alias dir='dir --color=auto'
alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
## list aliasas
#alias l='ls -1Bh --group-directories-first' # '1' 4 one entry/line, 'B' ignores backups (~), 'h' 4 human readable (kiB, MiB, ...)
#alias ll='ls -1ABh --group-directories-first' # 'A' 4 almost all
alias l='ls -1Bhl --group-directories-first' # 'n' 4 numeric uid/gid, 'o' like 'l' without group
alias ll='ls -1ABhl --group-directories-first'
alias d='dirs -v' # lists zsh directory stack (enter <cd +- tab>, plus & minus (reverse) literally, with completion!'
alias blk='sudo blkid -o list'
alias hist='fc -El 0 | grep'
alias lsa='lsarchives '
## edit aliases
#alias editf='sudo emc /etc/fstab'
alias editf='sudo cp /etc/fstab /etc/fstab.$(date +%y%m%d%H%S) && sudo emc /etc/fstab'
alias editb='emacsclient -c $HOME/.bashrc'
alias editz='emacsclient -c $HOME/.zshrc'
alias editx='emacsclient -c $HOME/.xinitrc'
alias edita='emacsclient -c $HOME/.config/awesome/rc.lua'
## mount aliases
alias mnta='sudo mount -a; echo -e $red"mounted:"$default; mount' # echo 4 color, semicolon 4 1. command, if ok, than 2. com
alias uma='sudo umount -a; echo -e $red"mounted:"$default; mount'
## pacman aliases
alias pii='sudo pacman -S' # install 1 pkg
alias pi='sudo pacman -Syyu' # Do a full system upgrade
alias pq='bauerbill -Ss --aur' # Search for all repo and AUR packages
alias pp='sudo powerpill -Syyu' # Do a full system upgrade using pauerpill with rsync
alias ppa='sudo bb-wrapper -Syyu --aur' # Do a full system upgrade with AUR support using bauerbill with rsync
alias pa='sudo bb-wrapper -Su --aur' # install from AUR using bauerbill with rsync
alias px='sudo pacman -R' # Remove package
alias pc='sudo pacman -Scc && sudo pacman-optimize' # remove all cached pkg! and defragment
alias reflect='sudo reflector -p https -f 10 -l 10 --sort rate --save /etc/pacman.d/mirrorlist' # save 10 fastest of the 10 recent mirrors using https
## non root aliases
alias s='sudo su -' #--> zum einfacher zu root zu kommen... siehe /etc/sudoers für details
alias sudo='sudo '
## file aliases
alias du='du -d 1 -h'
alias dua='du -d 1 -ah' # Display the size of files at depth 1 in current location in human-readable form
alias duf='du -sh' # Display the size of files in current location in human-readable form
alias df='df -h'
alias dfa='df -ah'
alias countf='find . -type f | wc -l' # number of all files in dir
alias countd='find . -type d | wc -l' # number of all subdirs in dir
#alias rmtmp='rm *\#; rm *~; rm .*~' # moved to script
alias ex='extract '
## network alias
alias oe1='mplayer http://mp3stream3.apasf.apa.at:8000/listen.pls'
## launch alias
alias x='startx'
#alias evince='dbus-launch evince'
alias e="emacsclient -ca \'\'" # > service moved to systemd
alias scan='scanimage --format=tiff --mode=Color' #>http://lists.alioth.debian.org/pipermail/sane-devel/2001-December/001177.html
alias am='alsamixer'
alias halt='systemctl poweroff'
#alias mm='udisksctl mount -b' ## nemo mounts on click
## misc
alias u='urxvtc'
#alias dark='razercfg -l all:off'
#alias light='razercfg -l GlowingLogo:off -l Scrollwheel:on'
#alias fast='razercfg -r 1:3'
#alias slow='razercfg -r 1:2'
alias rename='perl-rename'
#alias zephyr='/usr/bin/git --git-dir=$HOME/.zephyr --work-tree=$HOME'
alias rainbow='for (( i = 30; i < 38; i++ )); do echo -e "\033[0;"$i"m Normal: (0;$i); \033[1;"$i"m Light: (1;$i)"; done'
alias fifi='figlet -w 200 -f "shadow" '
alias cp='rsync -aP' # show percentage
#alias ap='adb pull /sdcard/DCIM/Camera/ /mnt/troika/photos/2021/'
# | _)
# _ \ __ \ __| | _ \ __ \ __|
# ( | | | | | ( | | |\__ \
# \___/ .__/ \__|_|\___/ _| _|____/
# _|
setopt extendedglob # inverted expansion like: ls *~*.txt
#setopt correct # correct mistakes
setopt auto_list # list choice on ambiguous command
setopt listtypes # %1 killed. will show up exactly when it is killed.
setopt auto_cd # change dir by just typing its name wo cd
setopt auto_pushd # automatically adds dirs to stack
setopt prompt_subst # prompt more dynamic, allow function in prompt
setopt no_beep # never ever beep ever (alt: unsetopt beep)
setopt rm_star_wait # Wait, and ask if the user is serious when doing rm *
#setopt completealiases # is enabled elsewhere/ otherwise no effect
setopt append_history # Don't overwrite history
#setopt inc_append_history # saves in chronological order, all sessions
setopt share_history # even more, sessioins share the same file!
setopt hist_ignore_all_dups # when runing a command several times, only store one
setopt hist_reduce_blanks # reduce whitespace in history
setopt hist_ignore_space # do not remember commands starting with space
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
# _| | _)
# | | | __ \ __| __| | _ \ __ \ __|
# __| | | | | ( | | ( | | |\__ \
# _| \__,_|_| _|\___|\__|_|\___/ _| _|____/
## archive extraction
extract() {
local remove_archive
local success
local extract_dir
if (( $# == 0 )); then
cat <<-'EOF' >&2
Usage: extract [-option] [file ...]
Options:
-r, --remove Remove archive after unpacking.
EOF
fi
remove_archive=1
if [[ "$1" == "-r" ]] || [[ "$1" == "--remove" ]]; then
remove_archive=0
shift
fi
while (( $# > 0 )); do
if [[ ! -f "$1" ]]; then
echo "extract: '$1' is not a valid file" >&2
shift
continue
fi
success=0
extract_dir="${1:t:r}"
case "${1:l}" in
(*.tar.gz|*.tgz) (( $+commands[pigz] )) && { pigz -dc "$1" | tar xv } || tar zxvf "$1" ;;
(*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;;
(*.tar.xz|*.txz)
tar --xz --help &> /dev/null \
&& tar --xz -xvf "$1" \
|| xzcat "$1" | tar xvf - ;;
(*.tar.zma|*.tlz)
tar --lzma --help &> /dev/null \
&& tar --lzma -xvf "$1" \
|| lzcat "$1" | tar xvf - ;;
(*.tar) tar xvf "$1" ;;
(*.gz) (( $+commands[pigz] )) && pigz -d "$1" || gunzip "$1" ;;
(*.bz2) bunzip2 "$1" ;;
(*.xz) unxz "$1" ;;
(*.lzma) unlzma "$1" ;;
(*.z) uncompress "$1" ;;
(*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk|*.aar|*.whl) unzip "$1" -d $extract_dir ;;
(*.rar) unrar x -ad "$1" ;;
(*.7z) 7za x "$1" ;;
(*.deb)
mkdir -p "$extract_dir/control"
mkdir -p "$extract_dir/data"
cd "$extract_dir"; ar vx "../${1}" > /dev/null
cd control; tar xzvf ../control.tar.gz
cd ../data; extract ../data.tar.*
cd ..; rm *.tar.* debian-binary
cd ..
;;
(*)
echo "extract: '$1' cannot be extracted" >&2
success=1
;;
esac
(( success = $success > 0 ? $success : $? ))
(( $success == 0 )) && (( $remove_archive == 0 )) && rm "$1"
shift
done
}
## list archives
lsarchive() {
if [ -f $1 ]; then
case $1 in
*.tar.bz2) tar jtf $1 ;;
*.tar.gz) tar ztf $1 ;;
*.tar) tar tf $1 ;;
*.tgz) tar ztf $1 ;;
*.zip) unzip -l $1 ;;
*.rar) rar vb $1 ;;
*.7z) 7z l $1 ;;
*) echo"'$1' Error. I have no idea what to do with that";;
esac
else
echo "'$1' is not a valid archive"
fi
}
## man coloring
man() {
env LESS_TERMCAP_mb=$'\E[01;31m' \
LESS_TERMCAP_md=$'\E[01;38;5;74m' \
LESS_TERMCAP_me=$'\E[0m' \
LESS_TERMCAP_se=$'\E[0m' \
LESS_TERMCAP_so=$'\E[38;5;246m' \
LESS_TERMCAP_ue=$'\E[0m' \
LESS_TERMCAP_us=$'\E[04;38;5;146m' \
man "$@"
}
## Pressing enter in a git directory runs `git status`
## in other directories `ls`
magic-enter () {
## If commands are not already set, use the defaults
[ -z "$MAGIC_ENTER_GIT_COMMAND" ] && MAGIC_ENTER_GIT_COMMAND="git status ."
[ -z "$MAGIC_ENTER_OTHER_COMMAND" ] && MAGIC_ENTER_OTHER_COMMAND="ls -1Bhl --group-directories-first ."
if [[ -z $BUFFER ]]; then
echo ""
if git rev-parse --is-inside-work-tree &>/dev/null; then
eval "$MAGIC_ENTER_GIT_COMMAND"
else
eval "$MAGIC_ENTER_OTHER_COMMAND"
fi
zle redisplay
else
zle accept-line
fi
}
zle -N magic-enter
bindkey "^M" magic-enter
## cd + ls
function chpwd() {
emulate -L zsh
ls -1Bhl --group-directories-first --color=auto . # runs ls (...) after typing cd!
}
## anti tar-bomb
atb() { l=$(tar tf $1); if [ $(echo "$l" | wc -l) -eq $(echo "$l" | grep $(echo "$l" | head -n1) | wc -l) ]; then tar xf $1; else mkdir ${1%.t(ar.gz||ar.bz2||gz||bz||ar)} && tar xf $1 -C ${1%.t(ar.gz||ar.bz2||gz||bz||ar)}; fi ;}
## quick dir change
rationalize-dot() {
if [[ $LBUFFER = *.. ]]; then
LBUFFER+=/..
else
LBUFFER+=.
fi
}
zle -N rationalize-dot
bindkey . rationalize-dot
## prompt_char
## changes the prompt char to 'g' if the current dir is a git repo
function prompt_char {
git branch >/dev/null 2>/dev/null && echo ' + ' && return
echo ' '
}
# function cmd_fail {
# if [ "`echo $?`" -ne "0" ]; then
# echo ":( "
# fi
# }
## git_branch
## if the current dir is a git repo, it prints the current branch and a * if there is
## stuff to be commited.
function git_branch {
git branch >/dev/null 2>/dev/null && echo -n "git:"$(git branch | grep "*" | sed 's/* //')
git status >/dev/null 2>/dev/null | grep modified >/dev/null 2>/dev/null && echo "* " && return
echo " "
}
# ## sudo or sudoedit will be inserted before the command @ Dongweiming <[email protected]>
# sudo-command-line() {
# [[ -z $BUFFER ]] && zle up-history
# if [[ $BUFFER == sudo\ * ]]; then
# LBUFFER="${LBUFFER#sudo }"
# elif [[ $BUFFER == $EDITOR\ * ]]; then
# LBUFFER="${LBUFFER#$EDITOR }"
# LBUFFER="sudoedit $LBUFFER"
# elif [[ $BUFFER == sudoedit\ * ]]; then
# LBUFFER="${LBUFFER#sudoedit }"
# LBUFFER="$EDITOR $LBUFFER"
# else
# LBUFFER="sudo $LBUFFER"
# fi
# }
# zle -N sudo-command-line
# ## Defined shortcut keys: [Esc] [Esc]
# bindkey -M emacs '\e\e' sudo-command-line
# #bindkey -M vicmd '\e\e' sudo-command-line
# #bindkey -M viins '\e\e' sudo-command-line
## colors, a lot of colors!
function clicolors() {
i=1
for color in {000..255}; do;
c=$c"$FG[$color]$color✔$reset_color ";
if [ `expr $i % 8` -eq 0 ]; then
c=$c"\n"
fi
i=`expr $i + 1`
done;
echo $c | sed 's/%//g' | sed 's/{//g' | sed 's/}//g' | sed '$s/..$//';
c=''
}
# __| _` | __ \ _` | _ \ __|
# | ( | | | ( | __/ |
# _| \__,_|_| _|\__, |\___|_|
# |___/
## This is based on: https://github.com/ranger/ranger/blob/master/examples/bash_automatic_cd.sh
## Paste this into your .zshrc:
# function zranger {
# tempfile="$(mktemp -t tmp.XXXXXX)"
# /usr/bin/ranger --choosedir="$tempfile" "${@:-$(pwd)}"
# test -f "$tempfile" &&
# if [ "$(cat -- "$tempfile")" != "$(echo -n `pwd`)" ]; then
# cd -- "$(cat "$tempfile")"
# fi
# rm -f -- "$tempfile"
# }
## https://wiki.archlinux.org/index.php/Ranger
#$RANGERCD && unset RANGERCD && ranger-cd
## ranger-cd will fire for Ctrl+D
bindkey -s '^D' 'zranger\n'
## Preventing nested ranger instances You can start a shell in the
##current directory with S, when you exit the shell you get back to
##your ranger instance. When you however forget that you already are
##in a ranger shell and start ranger again you end up with ranger
##running a shell running ranger.
zranger() {
if [ -z "$RANGER_LEVEL" ]; then
. ranger # start in current dir
else
exit
fi
}
# _ / __| _` | __ \ _` | _ \ __|
# / | ( | | | ( | __/ |
# ___|_| \__,_|_| _|\__, |\___|_|
# |___/
## based on https://github.com/Vifon/zranger
## switching retains tabs!
# zranger() {
# local RANGER_PID
# if RANGER_PID=$(tmux list-panes -s -F '#{pane_pid}' -t ranger 2> /dev/null); then
# # Leave the current cwd for ranger to read and cleanup.
# pwd > /tmp/zranger-cwd-$UID
# # Detach the other zranger instance...
# tmux detach-client -s ranger
# # ...and give it some time to read ranger's cwd before it changes.
# sleep 0.05 # May need some tweaking.
# # Tell ranger to read zsh's cwd from /tmp and cd to it.
# kill -SIGUSR1 $RANGER_PID
# # Attach to it.
# TMUX='' tmux attach -t ranger
# else
# TMUX='' tmux new-session -s ranger 'exec ranger --cmd="set preview_images=false"'
# fi
# # A second check needed because the process could have been
# # started or stopped in the meantime.
# if RANGER_PID=$(tmux list-panes -s -F '#{pane_pid}' -t ranger 2> /dev/null); then
# cd -P /proc/$RANGER_PID/cwd
# fi
# }
# ## ranger-cd will fire for Ctrl+D
# #autoload -U zranger # embedded in zshrc
# bindkey -s '^D' "\eq zranger\n"
# |
# __ \ __| _ \ __ `__ \ __ \ __|
# | | | ( | | | | | | |
# .__/ _| \___/ _| _| _| .__/ \__|
# _| _|
BLACK="%{"$'\033[00;30m'"%}"
BBLACK="%{"$'\033[01;30m'"%}"
RED="%{"$'\033[00;31m'"%}"
BRED="%{"$'\033[01;31m'"%}"
GREEN="%{"$'\033[00;32m'"%}"
BGREEN="%{"$'\033[01;32m'"%}"
YELLOW="%{"$'\033[00;33m'"%}"
BYELLOW="%{"$'\033[01;33m'"%}"
BLUE="%{"$'\033[00;34m'"%}"
BBLUE="%{"$'\033[01;34m'"%}"
MAGENTA="%{"$'\033[00;35m'"%}"
BMAGENTA="%{"$'\033[01;35m'"%}"
CYAN="%{"$'\033[00;36m'"%}"
BCYAN="%{"$'\033[01;36m'"%}"
WHITE="%{"$'\033[00;37m'"%}"
BWHITE="%{"$'\033[01;37m'"%}"
NORM="%{"$'\033[00m'"%}"
PROMPT="${BWHITE}%~${BCYAN} @${BWHITE}"'$(prompt_char)'"${WHITE}" # Quote Jungle;)
RPROMPT='$(git_branch)%T'
#RPROMPT='$(cmd_fail)$(git_branch)%T'
#PROMPT="${BBLACK}%n${YELLOW}@${BBLACK}%M ${WHITE}%~ ${BBLUE}"'$(prompt_char)'" ${WHITE}" # Vote Jungle;)
#PROMPT='[%{$fg[blue]%}%n$white@$cyan%m$reset:%~]$(prompt_char) ' # @jinn
#RPROMPT='$(cmd_fail)$(git_branch)%T'
# _ \ __ \\ \ /
# __/ | |\ \ /
# \___|_| _| \_/
#export HS='alsa_output.usb-047f_c001-00-U0x47f0xc001.analog-stereo'
#export SP='alsa_output.pci-0000_00_1b.0.analog-stereo'
export EDITOR='emacsclient -c -a ""'
export PATH='/bin:/usr/bin:/usr/local/bin:/home/m/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/games:/usr/local/games:/home/m/vscloud/bin'
#path+=/scripts #hängt zur $path eben was an...
#export QT_QPA_PLATFORMTHEME='qt5ct' # qt5 gtk blending
#export QT_STYLE_OVERRIDE='qt5ct'
#export QT_QPA_PLATFORMTHEME='gtk2' # qt looks like current gtk theme
#export QT_STYLE_OVERRIDE='gtk2'
QT_QPA_PLATFORMTHEME='Adwaita-Dark'
QT_STYLE_OVERRIDE='Adwaita-Dark'
export ALSA_CARD='PCH'
export ALSA_CTL='PCH'
export CALIBRE_USE_DARK_PALETTE=1
export XDG_CURRENT_DESKTOP='GNOME'
# | _| _|
# __| __| | | | |
# \__ \ | | | __| __|
# ____/\__|\__,_|_| _|
## turn off XOFF/XON
stty -ixon
## turn off powersaver/screensaver/blanking/bell
#xset -dpms s off s noblank -b
## key setups
bindkey -e # emacs key bindings: yeeha:D
bindkey ' ' magic-space # also do history expansion on space, type '!!', then hit enter, watch
## word jumping
bindkey ";5C" forward-word
bindkey ";5D" backward-word
bindkey "[C" forward-word
bindkey "[D" backward-word
bindkey ";5A" up-line
bindkey ";5B" down-line
# | _)
# __ \ | | | _` | | __ \ __|
# | | | | | ( | | | |\__ \
# .__/ _|\__,_|\__, |_|_| _|____/
# _| |___/
## auto suggestion
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=6,bg=grey"
ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd completion) # will first try to find a suggestion from your history, but, if it can't find a match, will find a suggestion from the completion engine (experimental).
ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20
ZSH_AUTOSUGGEST_USE_ASYNC=1
## history-substring-search
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh
## autojump
#source /etc/profile.d/autojump.zsh
## syntax highlighning has to be last
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor)
## more colors! > manually copied
#source ~/.zsh/zsh-dircolors/zsh-dircolors.plugin.zsh
# |
# _` | | | __| _ \
# ( | | | | ( |
# \__,_|\__,_|\__|\___/
autoload -Uz compinit; compinit
autoload -U colors && colors
zstyle ':completion:*' completer _match _expand _complete _correct _approximate
zstyle ':completion:*' completions 1
zstyle ':completion:*' file-sort name
zstyle ':completion:*' glob 1
zstyle ':completion:*' insert-unambiguous true
zstyle ':completion:*' max-errors 2
zstyle ':completion:*' original true
zstyle ':completion:*' substitute 1
zstyle ':completion:*' special-dirs true # tab-completion for .. and others
zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
zstyle ':completion:*' menu select
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' squeeze-slashes true
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.config/shell/zsh_cache
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*:match:*' original only
zstyle ':completion:*' verbose true
zstyle ':completion:*:*:kill:*' menu yes select
zstyle ':completion:*:*:kill:*:processes' command 'ps haxopid:5,user:4,%cpu:4,ni:2,stat:3,etime:8,args'
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
zstyle ':completion:*:kill:*' force-list always
zstyle ':completion:*:processes' command "ps -au${USER}"
zstyle ':completion:*:sudo:*' command-path /bin /usr/bin /usr/local/bin /home/m/bin /sbin /usr/sbin /usr/local/sbin /usr/games /usr/local/games