From b9d7fe5a43a77d148608dd59e5e29a8033d993b3 Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Wed, 17 Oct 2018 20:08:45 -0500 Subject: [PATCH] main: Shift args rather than iterating over No functional change. Prepares for running a full alias through the state machine. --- highlighters/main/main-highlighter.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 455c21f..e6846c6 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -400,9 +400,11 @@ _zsh_highlight_main_highlighter_highlight_list() else args=(${(z)buf}) fi - for arg in $args; do + while (( $#args )); do # Save an unmunged copy of the current word. + arg=$args[1] arg_raw="$arg" + shift args # Initialize this_word and next_word. if (( in_redirection == 0 )); then