about summary refs log tree commit diff
path: root/Completion/Core/_main_complete
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Core/_main_complete')
-rw-r--r--Completion/Core/_main_complete11
1 files changed, 8 insertions, 3 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete
index af659e1d4..e71267677 100644
--- a/Completion/Core/_main_complete
+++ b/Completion/Core/_main_complete
@@ -29,10 +29,15 @@
 #
 #   local _set_options _unset_options
 #
-#   _set_options=("${(@f)$({ unsetopt kshoptionprint; setopt } 2>/dev/null)}")
-#   _unset_options=("${(@f)$({ unsetopt kshoptionprint; unsetopt } 2>/dev/null)}")
+#   if zmodload -e parameter; then
+#     _set_options=(${(k)options[(R)on]})
+#     _unset_options=(${(k)options[(R)off]})
+#   else
+#     _set_options=("${(@f)$({ unsetopt kshoptionprint; setopt } 2>/dev/null)}")
+#     _unset_options=("${(@f)$({ unsetopt kshoptionprint; unsetopt } 2>/dev/null)}")
+#   fi
 #
-# This is needed because completion function may set options locally
+# This is needed because completion functions may set options locally
 # which makes the output of setopt and unsetopt reflect a different
 # state than the global one for which you are completing.