From 35b2633ad941966f5fca07b625a594a5b68c0fdb Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Mon, 15 Nov 1999 12:01:46 +0000 Subject: manual/8639 --- Completion/Core/_description | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Completion/Core/_description') diff --git a/Completion/Core/_description b/Completion/Core/_description index 107be5cd6..8cd9cc2fb 100644 --- a/Completion/Core/_description +++ b/Completion/Core/_description @@ -1,6 +1,6 @@ #autoload -local gropt=-J +local gropt=-J format if [[ "$1" = -[VJ]* ]]; then gropt="$1" @@ -9,16 +9,20 @@ fi _lastdescr=( "$_lastdescr[@]" "$2" ) -if [[ -n "$compconfig[group_matches]" ]]; then - if [[ -n "$compconfig[description_format]" ]]; then - eval "$1=($gropt ${(q)2} -X ${(q)compconfig[description_format]//\\%d/$2})" +_style -s descriptions format format + +if _style matches group; then + if [[ -n "$format" ]]; then + eval "$1=($gropt ${(q)2} -X ${(q)format//\\%d/$2})" else eval "$1=($gropt ${(q)2})" fi else - if [[ -n "$compconfig[description_format]" ]]; then - eval "$1=(-X ${(q)compconfig[description_format]//\\%d/$2})" + if [[ -n "$format" ]]; then + eval "$1=(-X ${(q)format//\\%d/$2})" else eval "$1=()" fi fi + +return 0 -- cgit 1.4.1