about summary refs log tree commit diff
path: root/Completion/Base/_command_names
blob: 61fea56dd000674d9959394e3cccf86ff4f8bc1b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#compdef -command-

local nm=$compstate[nmatches] ret=1


# Complete jobs in implicit fg and bg
if [[ "$PREFIX[1]" = "%" ]]; then
  compgen -j -P '%'
  [[ nm -ne compstate[nmatches] ]] && return
fi

compgen -c && ret=0

if [[ nm -eq compstate[nmatches] ]]; then
  _path_files -/g "*(*)"
else
  return ret
fi