about summary refs log tree commit diff
path: root/Completion/Base/_default
blob: 4fb0b36ddd7ca24f7f0bab46f352481adeefbe0f (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
25
#compdef -default-

local expl

# You can first try the `compctl's by uncommenting the `compcall' line
# below.
# This is without first (-T) and default (-D) completion. If you want
# them add `-T' and/or `-D' to this command. If there is a `compctl'
# for the command we are working on, we return immediatly. If you want
# to use new style completion anyway, remove the `|| return'. Also,
# you may want to use new style completion if the `compctl' didn't
# produce any matches. In that case remove the `|| return' and insert
# the line `[[ compstate[nmatches] -eq 0 ]] || return' after `compcall'.

# compcall || return 0

_description expl file
_files "$expl[@]" && return

# magicequalsubst allows arguments like <any-old-stuff>=~/foo to do
# file name expansion after the =.  In that case, it's natural to
# allow completion to handle file names after any equals sign.
if [[ -o magicequalsubst ]] && compset -P 1 '*='; then
  _files "$expl[@]"
fi