about summary refs log tree commit diff
path: root/Completion/Base/Utility/_values
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Base/Utility/_values')
-rw-r--r--Completion/Base/Utility/_values12
1 files changed, 4 insertions, 8 deletions
diff --git a/Completion/Base/Utility/_values b/Completion/Base/Utility/_values
index 9a6913dad..bb0337911 100644
--- a/Completion/Base/Utility/_values
+++ b/Completion/Base/Utility/_values
@@ -1,15 +1,11 @@
 #autoload
 
-local subopts opt usecc
+local subopts opt usecc garbage
 
 subopts=()
-while [[ "$1" = -(O*|C) ]]; do
-  case "$1" in
-  -C) usecc=yes; shift ;;
-  -O) subopts=( "${(@P)2}" ); shift 2 ;;
-  *)  subopts=( "${(@P)${1[3,-1]}}" ); shift ;;
-  esac
-done
+zparseopts -D -E -a garbage C=usecc O:=subopts M: J: V: 1 2 n F: X:
+
+(( $#subopts )) && subopts=( "${(@P)subopts[2]}" )
 
 if compvalues -i "$@"; then