diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-02-02 00:03:42 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-02-02 00:03:42 +0300 |
commit | eb9da89ad9a8bd886e43c7f1d907495c5a48acc5 (patch) | |
tree | cea0ce149c6f9a2c2b11e05f92e6a65f6773defb /internal | |
parent | c08d1e846bd944d7e73a578c67fc63aa893ae888 (diff) |
quote $foo when running with unknown options; fixes #453
Diffstat (limited to 'internal')
-rw-r--r-- | internal/configure.zsh | 2 | ||||
-rw-r--r-- | internal/p10k.zsh | 26 | ||||
-rw-r--r-- | internal/parser.zsh | 2 | ||||
-rw-r--r-- | internal/worker.zsh | 4 |
4 files changed, 17 insertions, 17 deletions
diff --git a/internal/configure.zsh b/internal/configure.zsh index 588dd02a..8a21c639 100644 --- a/internal/configure.zsh +++ b/internal/configure.zsh @@ -59,7 +59,7 @@ function _p9k_can_configure() { } function p9k_configure() { - eval $__p9k_intro + eval "$__p9k_intro" ( set -- -f source $__p9k_root_dir/internal/wizard.zsh diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 55922b90..57a6ded6 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1,4 +1,4 @@ -if [[ $__p9k_sourced != 3 ]]; then +if [[ $__p9k_sourced != 4 ]]; then >&2 print -P "" >&2 print -P "[%F{1}ERROR%f]: Corrupted powerlevel10k installation." >&2 print -P "" @@ -112,7 +112,7 @@ typeset -grA __p9k_colors=( # # Type `getColorCode background` or `getColorCode foreground` to see the list of predefined colors. function getColorCode() { - eval $__p9k_intro + eval "$__p9k_intro" if (( ARGC == 1 )); then case $1 in foreground) @@ -139,7 +139,7 @@ function getColorCode() { # Sadly, this is a part of public API. Its use is emphatically discouraged. function print_icon() { - eval $__p9k_intro + eval "$__p9k_intro" (( $+functions[_p9k_print_icon] )) || source "${__p9k_root_dir}/internal/icons.zsh" _p9k_print_icon "$@" } @@ -150,7 +150,7 @@ function print_icon() { # otherwise "print_icon" is used, which takes the users # overrides into account. function get_icon_names() { - eval $__p9k_intro + eval "$__p9k_intro" (( $+functions[_p9k_get_icon_names] )) || source "${__p9k_root_dir}/internal/icons.zsh" _p9k_get_icon_names "$@" } @@ -3589,7 +3589,7 @@ function _p9k_maybe_ignore_git_repo() { } function _p9k_vcs_resume() { - eval $__p9k_intro + eval "$__p9k_intro" _p9k_maybe_ignore_git_repo @@ -5215,7 +5215,7 @@ function _p9k_on_expand() { (( _p9k__expanded && ! $+__p9k_instant_prompt_active )) && return () { - eval $__p9k_intro + eval "$__p9k_intro" _p9k_maybe_dump (( $+__p9k_instant_prompt_active )) && _p9k_clear_instant_prompt @@ -5305,7 +5305,7 @@ function _p9k_on_expand() { functions -M _p9k_on_expand _p9k_precmd_impl() { - eval $__p9k_intro + eval "$__p9k_intro" (( __p9k_enabled )) || return @@ -5404,7 +5404,7 @@ _p9k_precmd_impl() { _p9k_trapint() { if (( __p9k_enabled )); then - eval $__p9k_intro + eval "$__p9k_intro" zle && _p9k_on_widget_zle-line-finish int fi return 0 @@ -6023,7 +6023,7 @@ function _p9k_widget_hook() { fi fi - eval $__p9k_intro + eval "$__p9k_intro" (( _p9k__restore_prompt_fd )) && _p9k_restore_prompt $_p9k__restore_prompt_fd __p9k_reset_state=1 local pat idx var @@ -6097,7 +6097,7 @@ function _p9k_wrap_widgets() { } function _p9k_restore_prompt() { - eval $__p9k_intro + eval "$__p9k_intro" { (( _p9k__must_restore_prompt )) || return _p9k__must_restore_prompt=0 @@ -6891,7 +6891,7 @@ _p9k_setup() { prompt_opts+=cr fi - eval $__p9k_intro + eval "$__p9k_intro" prompt_powerlevel9k_teardown __p9k_enabled=1 typeset -ga preexec_functions=(_p9k_preexec1 $preexec_functions _p9k_preexec2) @@ -6901,7 +6901,7 @@ _p9k_setup() { prompt_powerlevel9k_setup() { _p9k_setup } prompt_powerlevel9k_teardown() { - eval $__p9k_intro + eval "$__p9k_intro" add-zsh-hook -D precmd '(_p9k_|powerlevel9k_)*' add-zsh-hook -D preexec '(_p9k_|powerlevel9k_)*' PROMPT='%m%# ' @@ -7069,7 +7069,7 @@ typeset -gi __p9k_reset_state function p10k() { [[ $# != 1 || $1 != finalize ]] || { p10k-instant-prompt-finalize; return 0 } - eval $__p9k_intro + eval "$__p9k_intro" if (( !ARGC )); then print -rP -- $__p9k_p10k_usage >&2 diff --git a/internal/parser.zsh b/internal/parser.zsh index 1f5d6eb3..7fe96abd 100644 --- a/internal/parser.zsh +++ b/internal/parser.zsh @@ -141,7 +141,7 @@ function _p9k_parse_buffer() { local rcquotes [[ -o rcquotes ]] && rcquotes=rcquotes - eval $__p9k_intro + eval "$__p9k_intro" setopt no_nomatch $rcquotes typeset -ga P9K_COMMANDS=() diff --git a/internal/worker.zsh b/internal/worker.zsh index 518b34fd..6b369740 100644 --- a/internal/worker.zsh +++ b/internal/worker.zsh @@ -85,7 +85,7 @@ function _p9k_worker_invoke() { } function _p9k_worker_cleanup() { - eval $__p9k_intro + eval "$__p9k_intro" [[ $_p9k__worker_shell_pid == $sysparams[pid] ]] && _p9k_worker_stop return 0 } @@ -106,7 +106,7 @@ function _p9k_worker_stop() { } function _p9k_worker_receive() { - eval $__p9k_intro + eval "$__p9k_intro" [[ -z $_p9k__worker_resp_fd ]] && return |