gospt/completions/_gspot

17 lines
330 B
Plaintext
Raw Normal View History

2024-02-19 02:51:25 +00:00
#compdef gspot
2024-02-18 09:30:19 +00:00
2024-04-03 04:30:26 +00:00
local -a opts
local cur
cur=${words[-1]}
if [[ "$cur" == "-"* ]]; then
opts=("${(@f)$(${words[@]:0:#words[@]-1} ${cur} --generate-shell-completion)}")
else
opts=("${(@f)$(${words[@]:0:#words[@]-1} --generate-shell-completion)}")
fi
2024-02-18 09:30:19 +00:00
2024-04-03 04:30:26 +00:00
if [[ "${opts[1]}" != "" ]]; then
_describe 'values' opts
else
_files
fi