diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-11-04 15:07:25 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-11-04 15:07:25 +0300 |
commit | 551dd0c27773e6a07f6a0b1ebe1866be4cb50708 (patch) | |
tree | e9c5a02670be8972160d9e17a85da0e95cb06b29 | |
parent | adb6f92f5900b531b2c796d7a14df99bfd8f197b (diff) |
remove eval
-rw-r--r-- | internal/p10k.zsh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index a9f59a1e..bb4ecfa6 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4837,18 +4837,17 @@ _p9k_wrap_zle_widget() { zle -N $orig ${widgets[$widget]#user:} ;; builtin) - eval "_p9k_orig_${(q)widget}() { zle .${(q)widget} }" + functions[_p9k_orig_$widget]="zle .${(q)widget}" zle -N $orig _p9k_orig_$widget ;; esac local wrapper=_p9k_wrapper_$widget_$hook - eval "function ${(q)wrapper}() { + functions[$wrapper]=" emulate -L zsh setopt no_hist_expand extended_glob no_prompt_bang prompt_{percent,subst} (( __p9k_enabled )) && ${(q)hook} \"\$@\" - (( \$+widgets[${(q)orig}] )) && zle ${(q)orig} -- \"\$@\" - }" + (( \$+widgets[${(q)orig}] )) && zle ${(q)orig} -- \"\$@\"" zle -N -- $widget $wrapper } |