diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-01 15:29:41 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-12-01 15:29:41 +0000 |
commit | f844c87a4d676bcc8ad7ac24b5132d7aa5ccfeca (patch) | |
tree | c2a3b06a34243abe3826eead259bb08900f011f1 /Completion/Core/_description | |
parent | 26cf7b8d50f1b7d9d0b9115018ef4dc8624b5030 (diff) | |
download | zsh-f844c87a4d676bcc8ad7ac24b5132d7aa5ccfeca.tar.gz zsh-f844c87a4d676bcc8ad7ac24b5132d7aa5ccfeca.tar.xz zsh-f844c87a4d676bcc8ad7ac24b5132d7aa5ccfeca.zip |
zsh-workers/8840
Diffstat (limited to 'Completion/Core/_description')
-rw-r--r-- | Completion/Core/_description | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/Completion/Core/_description b/Completion/Core/_description index 8cd9cc2fb..54518e49f 100644 --- a/Completion/Core/_description +++ b/Completion/Core/_description @@ -1,27 +1,33 @@ #autoload -local gropt=-J format +local gropt format gname -if [[ "$1" = -[VJ]* ]]; then - gropt="$1" +gropt=(-J) + +if [[ "$1" = -[VJ] ]]; then + gropt=("$1") + shift +elif [[ "$1" = -[VJ] ]]; then + gropt=("-${1[3,-1]}" "${1[1,2]}") shift fi -_lastdescr=( "$_lastdescr[@]" "$2" ) +_lastdescr=( "$_lastdescr[@]" "$3" ) _style -s descriptions format format +_style -s "$1" group-name gname && [[ -z "$gname" ]] && gname="$1" -if _style matches group; then +if [[ -n "$gname" ]]; then if [[ -n "$format" ]]; then - eval "$1=($gropt ${(q)2} -X ${(q)format//\\%d/$2})" + eval "$2=($gropt ${(q)gname} -X ${(q)format//\\%d/$3})" else - eval "$1=($gropt ${(q)2})" + eval "$2=($gropt ${(q)gname})" fi else if [[ -n "$format" ]]; then - eval "$1=(-X ${(q)format//\\%d/$2})" + eval "$2=(-J -default- -X ${(q)format//\\%d/$3})" else - eval "$1=()" + eval "$2=(-J -default-)" fi fi |