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

local format

format="$compconfig[message_format]"
[[ -z "$format" ]] && format="$compconfig[description_format]"

if [[ -n "$format" ]]; then
  if [[ $compstate[nmatches] -eq 0 ]]; then
    compstate[list]=list
    compstate[insert]=''
    compadd -UX "${format//\\%d/$1}" -n ''
    compstate[force_list]=yes
  else
    compadd -X "${format//\\%d/$1}" -n '' && compstate[force_list]=yes
  fi
fi