diff options
Diffstat (limited to 'Completion/Base/Core/_description')
-rw-r--r-- | Completion/Base/Core/_description | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Completion/Base/Core/_description b/Completion/Base/Core/_description index 30e6dfa9b..41f4f2483 100644 --- a/Completion/Base/Core/_description +++ b/Completion/Base/Core/_description @@ -1,13 +1,13 @@ #autoload -local name gropt=-J format gname hidden hide match opts tag +local name gropt nopt xopt format gname hidden hide match opts tag opts=() -if [[ "$1" = -([12]|)[VJ] ]]; then - gropt="$1" - shift -fi +gropt=(-J) +xopt=(-X) +nopt=() +zparseopts -K -D -a nopt 1 2 V=gropt J=gropt x=xopt 3="${${3##[[:blank:]]#}%%[[:blank:]]#}" [[ -n "$3" ]] && _lastdescr=( "$_lastdescr[@]" "$3" ) @@ -62,15 +62,15 @@ fi if [[ -n "$gname" ]]; then if [[ -n "$format" ]]; then - set -A "$name" "$opts[@]" "$gropt" "$gname" -X "$format" + set -A "$name" "$opts[@]" "$nopt[@]" "$gropt" "$gname" "$xopt" "$format" else - set -A "$name" "$opts[@]" "$gropt" "$gname" + set -A "$name" "$opts[@]" "$nopt[@]" "$gropt" "$gname" fi else if [[ -n "$format" ]]; then - set -A "$name" "$opts[@]" "$gropt" -default- -X "$format" + set -A "$name" "$opts[@]" "$nopt[@]" "$gropt" -default- "$xopt" "$format" else - set -A "$name" "$opts[@]" "$gropt" -default- + set -A "$name" "$opts[@]" "$nopt[@]" "$gropt" -default- fi fi |