2019-10-06 08:58:51 +00:00
|
|
|
#compdef $PROG
|
|
|
|
|
2016-07-20 22:02:16 +00:00
|
|
|
_cli_zsh_autocomplete() {
|
2014-06-18 15:59:07 +00:00
|
|
|
|
2016-07-20 22:02:16 +00:00
|
|
|
local -a opts
|
2020-02-09 17:27:45 +00:00
|
|
|
local cur
|
|
|
|
cur=${words[-1]}
|
|
|
|
if [[ "$cur" == "-"* ]]; then
|
|
|
|
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} ${cur} --generate-bash-completion)}")
|
|
|
|
else
|
|
|
|
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
|
|
|
|
fi
|
2016-07-20 22:02:16 +00:00
|
|
|
|
2020-02-09 17:27:45 +00:00
|
|
|
if [[ "${opts[1]}" != "" ]]; then
|
|
|
|
_describe 'values' opts
|
2020-05-03 10:10:39 +00:00
|
|
|
else
|
|
|
|
_files
|
2020-02-09 17:27:45 +00:00
|
|
|
fi
|
2016-07-20 22:02:16 +00:00
|
|
|
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
compdef _cli_zsh_autocomplete $PROG
|