2000-04-01 22:43:43 +02:00
|
|
|
#compdef -default-
|
1999-04-15 20:05:38 +02:00
|
|
|
|
2000-04-01 22:43:43 +02:00
|
|
|
local ctl
|
1999-04-15 20:05:38 +02:00
|
|
|
|
2000-04-01 22:43:43 +02:00
|
|
|
if { zstyle -s ":completion:${curcontext}:" use-compctl ctl ||
|
|
|
|
zmodload -e zsh/compctl } && [[ "$ctl" != (no|false|0|off) ]]; then
|
|
|
|
local opt
|
1999-04-15 20:05:38 +02:00
|
|
|
|
2000-04-01 22:43:43 +02:00
|
|
|
opt=()
|
|
|
|
[[ "$ctl" = *first* ]] && opt=(-T)
|
|
|
|
[[ "$ctl" = *default* ]] && opt=("$opt[@]" -D)
|
|
|
|
compcall "$opt[@]" || return 0
|
|
|
|
fi
|
|
|
|
|
2000-04-17 10:22:44 +02:00
|
|
|
_files "$@" && return 0
|
2000-04-01 22:43:43 +02:00
|
|
|
|
|
|
|
# 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.
|
|
|
|
|
2000-04-17 10:22:44 +02:00
|
|
|
if [[ -o magicequalsubst && "$PREFIX" = *\=* ]]; then
|
|
|
|
compstate[parameter]="${words[1]:t}-${PREFIX%%\=*}"
|
|
|
|
compset -P 1 '*='
|
|
|
|
_value "$@"
|
|
|
|
else
|
|
|
|
return 1
|
|
|
|
fi
|