1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-25 21:40:08 +00:00

tabs to spaces

This commit is contained in:
romkatv 2019-07-16 10:33:53 +02:00
parent 06aa8da96e
commit 38da6a3c9b

View file

@ -2810,22 +2810,22 @@ _p9k_wrap_zle_widget() {
local hook=$2 local hook=$2
local orig=p9k-orig-$widget local orig=p9k-orig-$widget
case $widgets[$widget] in case $widgets[$widget] in
user:*) user:*)
zle -N $orig ${widgets[$widget]#user:} zle -N $orig ${widgets[$widget]#user:}
;; ;;
builtin) builtin)
eval "_p9k_orig_${(q)widget}() { zle .${(q)widget} }" eval "_p9k_orig_${(q)widget}() { zle .${(q)widget} }"
zle -N $orig _p9k_orig_$widget zle -N $orig _p9k_orig_$widget
;; ;;
esac esac
local wrapper=_p9k_wrapper_$widget_$hook local wrapper=_p9k_wrapper_$widget_$hook
eval "function ${(q)wrapper}() { eval "function ${(q)wrapper}() {
${(q)hook} \"\$@\" ${(q)hook} \"\$@\"
(( \$+widgets[${(q)orig}] )) && zle ${(q)orig} -- \"\$@\" (( \$+widgets[${(q)orig}] )) && zle ${(q)orig} -- \"\$@\"
}" }"
zle -N -- $widget $wrapper zle -N -- $widget $wrapper
} }
_p9k_init() { _p9k_init() {