From 2d4fe988baf2390eb08d8f1604bb8daa1fc58dcc Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Thu, 18 Oct 2018 22:36:01 -0500 Subject: [PATCH] main: Rename parameters to simplify next diff --- highlighters/main/main-highlighter.zsh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 4666f48..9776ba4 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -533,20 +533,20 @@ _zsh_highlight_main_highlighter_highlight_list() local res="$REPLY" if [[ $res == "alias" ]]; then () { - local -A seen_arg + local -A seen_alias while [[ $REPLY == alias ]]; do - seen_arg[$arg]=1 + seen_alias[$arg]=1 _zsh_highlight_main__resolve_alias $arg # Use a temporary array to ensure the subscript is interpreted as # an array subscript, not as a scalar subscript - local -a reply + local -a alias_args # TODO: the ${interactive_comments+set} path needs to skip comments; see test-data/alias-comment1.zsh - reply=( ${interactive_comments-${(z)REPLY}} - ${interactive_comments+${(zZ+c+)REPLY}} ) + alias_args=( ${interactive_comments-${(z)REPLY}} + ${interactive_comments+${(zZ+c+)REPLY}} ) # Avoid looping forever on alias a=b b=c c=b, but allow alias foo='foo bar' - [[ $arg == $reply[1] ]] && break - arg=$reply[1] - if (( $+seen_arg[$arg] )); then + [[ $arg == $alias_args[1] ]] && break + arg=$alias_args[1] + if (( $+seen_alias[$arg] )); then res=none break fi