about summary refs log tree commit diff
path: root/Completion/Base
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2012-01-05 19:59:42 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2012-01-05 19:59:42 +0000
commit432112c4256bf7e33776fa1ad57e148b5864e303 (patch)
treeea9ea2f1c49d7abaa8edc74fbfd5f1dcd86d0acb /Completion/Base
parent1a330ad751c7f36759c19ef25a13b20816f2d225 (diff)
downloadzsh-432112c4256bf7e33776fa1ad57e148b5864e303.tar.gz
zsh-432112c4256bf7e33776fa1ad57e148b5864e303.tar.xz
zsh-432112c4256bf7e33776fa1ad57e148b5864e303.zip
30081: make _main_complete independent of IGNORE_CLOSE_BRACES option
Diffstat (limited to 'Completion/Base')
-rw-r--r--Completion/Base/Core/_main_complete13
1 files changed, 10 insertions, 3 deletions
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