2024-02-18 18:51:25 -08:00
|
|
|
#compdef gspot
|
2024-02-18 01:30:19 -08:00
|
|
|
|
2024-04-02 21:30:26 -07: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 01:30:19 -08:00
|
|
|
|
2024-04-02 21:30:26 -07:00
|
|
|
if [[ "${opts[1]}" != "" ]]; then
|
|
|
|
_describe 'values' opts
|
|
|
|
else
|
|
|
|
_files
|
|
|
|
fi
|