mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-12-12 19:18:28 +02:00
remove eval
This commit is contained in:
parent
adb6f92f59
commit
551dd0c277
@ -4837,18 +4837,17 @@ _p9k_wrap_zle_widget() {
|
|||||||
zle -N $orig ${widgets[$widget]#user:}
|
zle -N $orig ${widgets[$widget]#user:}
|
||||||
;;
|
;;
|
||||||
builtin)
|
builtin)
|
||||||
eval "_p9k_orig_${(q)widget}() { zle .${(q)widget} }"
|
functions[_p9k_orig_$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}() {
|
functions[$wrapper]="
|
||||||
emulate -L zsh
|
emulate -L zsh
|
||||||
setopt no_hist_expand extended_glob no_prompt_bang prompt_{percent,subst}
|
setopt no_hist_expand extended_glob no_prompt_bang prompt_{percent,subst}
|
||||||
(( __p9k_enabled )) && ${(q)hook} \"\$@\"
|
(( __p9k_enabled )) && ${(q)hook} \"\$@\"
|
||||||
(( \$+widgets[${(q)orig}] )) && zle ${(q)orig} -- \"\$@\"
|
(( \$+widgets[${(q)orig}] )) && zle ${(q)orig} -- \"\$@\""
|
||||||
}"
|
|
||||||
|
|
||||||
zle -N -- $widget $wrapper
|
zle -N -- $widget $wrapper
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user