From 432112c4256bf7e33776fa1ad57e148b5864e303 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 5 Jan 2012 19:59:42 +0000 Subject: 30081: make _main_complete independent of IGNORE_CLOSE_BRACES option --- Completion/Base/Core/_main_complete | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'Completion') diff --git a/Completion/Base/Core/_main_complete b/Completion/Base/Core/_main_complete index 9bc5611de..d6831b81b 100644 --- a/Completion/Base/Core/_main_complete +++ b/Completion/Base/Core/_main_complete @@ -3,6 +3,10 @@ # The main loop of the completion code. This is what is called when # completion is attempted from the command line. +# Note that this function is parsed before $_comp_setup is evaluated, +# so that it should make conservative assumptions about the setting +# of the various options that affect parsing. + # In case non-standard separators are in use. local IFS=$' \t\n\0' @@ -52,9 +56,12 @@ if [[ ( "$tmp" = *pending(|[[:blank:]]*) && PENDING -gt 0 ) || fi if [[ "$compstate[insert]" = tab* ]]; then - { [[ "$tmp" = (|*[[:blank:]])(yes|true|on|1)(|[[:blank:]]*) ]] && - { [[ "$curcontext" != :* || -z "$compstate[vared]" ]] || - zstyle -t ":completion:vared${curcontext}:" insert-tab } } && return 0 + if [[ "$tmp" = (|*[[:blank:]])(yes|true|on|1)(|[[:blank:]]*) ]]; then + if [[ "$curcontext" != :* || -z "$compstate[vared]" ]] || + zstyle -t ":completion:vared${curcontext}:" insert-tab; then + return 0 + fi + fi compstate[insert]="${compstate[insert]//tab /}" fi -- cgit 1.4.1