Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: 3.1.6-test-2: _parameters



And the same for _main_complete.

I'm still thinking about adding some more special parameters to the
parameter module. Maybe, some day...

Bye
 Sven

diff -u oc/Core/_main_complete Completion/Core/_main_complete
--- oc/Core/_main_complete	Fri Jul 23 10:58:35 1999
+++ Completion/Core/_main_complete	Fri Jul 23 11:14:51 1999
@@ -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.
 

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author