about summary refs log tree commit diff
path: root/Completion/Core/_description
blob: a19a8373c441ec5f8843d8105812e899fa5d6141 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#autoload

local gropt=-J

if [[ "$1" = -[VJ]* ]]; then
  gropt="$1"
  shift
fi

if [[ -n "$compconfig[group_matches]" ]]; then
  if [[ -n "$compconfig[description_format]" ]]; then
    eval "$1=($gropt ${(q)2} -X ${(q)compconfig[description_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})"
  else
    eval "$1=()"
  fi
fi