mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-10 17:38:13 +08:00
21 lines
421 B
Go Template
21 lines
421 B
Go Template
|
#compdef "{{.App.Name}}"
|
||
|
|
||
|
_dnscontrol() {
|
||
|
local -a opts
|
||
|
local cur
|
||
|
cur=${words[-1]}
|
||
|
if [[ "$cur" == "-"* ]]; then
|
||
|
opts=("${(@f)$(${words[@]:0:#words[@]-1} ${cur} --generate-bash-completion)}")
|
||
|
else
|
||
|
opts=("${(@f)$(${words[@]:0:#words[@]-1} --generate-bash-completion)}")
|
||
|
fi
|
||
|
|
||
|
if [[ "${opts[1]}" != "" ]]; then
|
||
|
_describe 'values' opts
|
||
|
else
|
||
|
_files
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
compdef "_dnscontrol" "{{.App.Name}}"
|