about summary refs log tree commit diff
path: root/Completion/Base/Core/_wanted
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/_wanted
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/_wanted')
-rw-r--r--Completion/Base/Core/_wanted21
1 files changed, 5 insertions, 16 deletions
diff --git a/Completion/Base/Core/_wanted b/Completion/Base/Core/_wanted
index 3e25fdbbc..f96b266bd 100644
--- a/Completion/Base/Core/_wanted
+++ b/Completion/Base/Core/_wanted
@@ -1,26 +1,15 @@
 #autoload
 
-local __targs __gopt=-J
+local __targs __gopt
 
-if [[ "$1" = -C?* ]]; then
-  __targs=( -C "${1[3,-1]}" )
-  shift
-elif [[ "$1" = -C ]]; then
-  __targs=( -C "$2" )
-  shift 2
-else
-  __targs=()
-fi
-
-if [[ "$1" = -([12]|)[VJ] ]]; then
-  __gopt="$1"
-  shift
-fi
+__gopt=()
+__tagrs=()
+zparseopts -D -a __gopt 1 2 V J x C:=__targs
 
 _tags "$__targs[@]" "$1"
 
 while _tags; do
-  _all_labels "$__gopt" "$@" && return 0
+  _all_labels "$__gopt[@]" "$@" && return 0
 done
 
 return 1