about summary refs log tree commit diff
path: root/Completion/Base/Core/_next_label
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-02-12 13:37:00 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-02-12 13:37:00 +0000
commit77339cc21d723eed88e6e621d831ba28c6110b6d (patch)
tree0b828157c049d01ebb4a5fdd6b01bdf75ef2304c /Completion/Base/Core/_next_label
parent50758ce645d3c0e9c0e3d18e96c13638537cd4f6 (diff)
downloadzsh-77339cc21d723eed88e6e621d831ba28c6110b6d.tar.gz
zsh-77339cc21d723eed88e6e621d831ba28c6110b6d.tar.xz
zsh-77339cc21d723eed88e6e621d831ba28c6110b6d.zip
add -x option (to be passed on to compadd) to _description and friends; make _message respect any -[12VJ] options it gets, adding the message to that group (16609)
Diffstat (limited to 'Completion/Base/Core/_next_label')
-rw-r--r--Completion/Base/Core/_next_label12
1 files changed, 5 insertions, 7 deletions
diff --git a/Completion/Base/Core/_next_label b/Completion/Base/Core/_next_label
index 48845229a..ff9b658a1 100644
--- a/Completion/Base/Core/_next_label
+++ b/Completion/Base/Core/_next_label
@@ -1,21 +1,19 @@
 #autoload
 
-local __gopt=-J __descr __spec
+local __gopt __descr __spec
 
-if [[ "$1" = -([12]|)[VJ] ]]; then
-  __gopt="$1"
-  shift
-fi
+__gopt=()
+zparseopts -D -a __gopt 1 2 V J x
 
 if comptags -A "$1" curtag __spec; then
   _comp_tags="$_comp_tags $__spec "
   if [[ "$curtag" = *[^\\]:* ]]; then
     zformat -f __descr "${curtag#*:}" "d:$3"
-    _description "$__gopt" "${curtag%:*}" "$2" "$__descr"
+    _description "$__gopt[@]" "${curtag%:*}" "$2" "$__descr"
     curtag="${curtag%:*}"
     set -A $2 "${(P@)2}" "${(@)argv[4,-1]}"
   else
-    _description "$__gopt" "$curtag" "$2" "$3"
+    _description "$__gopt[@]" "$curtag" "$2" "$3"
     set -A $2 "${(@)argv[4,-1]}" "${(P@)2}"
   fi