diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-01-11 20:23:48 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-01-11 20:23:48 +0300 |
commit | df4b33c699a2ecf62f3ac0ddb2331bad79a1916e (patch) | |
tree | 56aa3d0d7d2510098c83c37a21443a207a2b44cc /internal | |
parent | 347392daabf1d7325d4fd5d83bd5471bf06b5cc2 (diff) |
handle early precommand termination
Diffstat (limited to 'internal')
-rw-r--r-- | internal/parse.zsh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/internal/parse.zsh b/internal/parse.zsh index b59b4c73..f7d848a6 100644 --- a/internal/parse.zsh +++ b/internal/parse.zsh @@ -114,6 +114,10 @@ typeset -gA _p9k_skip_arg=( # --------------- # ${x/} # --------------- +# - -- x +# --------------- +# command -p -p x +# --------------- # * # --------------- # x=$y; $x @@ -187,14 +191,16 @@ function _p9k_extract_commands() { done case $state in - t) + t|p*) if (( $+_p9k_term[$token] )); then skip=$_p9k_skip_arg[$token] state=${skip:+s} [[ $token == '()' ]] || _p9k_commands+=($commands) commands=() - fi - continue;; + continue + elif [[ $state == t ]]; then + continue + fi;; s) if [[ $token == $~skip ]]; then state= @@ -220,7 +226,6 @@ function _p9k_extract_commands() { fi if [[ $token == *'$'* ]]; then - setopt xtrace if [[ $token == $~var ]]; then n=${${token##[^[:IDENT:]]}%%[^[:IDENT:]]} [[ $token == *'"' ]] && v=("${(@P)n}") || v=(${(P)n}) |