From 71a9847d48bcbcc4348b89d5fa1673496201f416 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 13 Jun 2001 11:05:51 +0000 Subject: fix for comparguments (completing after single letter options that get their argument in the next word); make _values ignore some of the standard option it may get; make _mount use _dir_list in some places and improve that; `document' comparguments and compvalues with some comments in computil.c (14897) --- Completion/Base/Utility/_values | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'Completion/Base') 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 -- cgit 1.4.1