diff options
Diffstat (limited to 'Completion/Core/_description')
-rw-r--r-- | Completion/Core/_description | 16 |
1 files changed, 10 insertions, 6 deletions
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 |