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

local gropt=-J

if [[ "$1" = -[VJ]* ]]; then
  gropt="$1"
  shift
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})"
  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