mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-11-10 00:10:36 +08:00
This commit is contained in:
parent
6e4689dc13
commit
ec241eea1b
1 changed files with 10 additions and 2 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
#compdef "{{.App.Name}}"
|
#compdef {{.App.Name}}
|
||||||
|
|
||||||
_dnscontrol() {
|
_dnscontrol() {
|
||||||
local -a opts
|
local -a opts
|
||||||
|
|
@ -17,4 +17,12 @@ _dnscontrol() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
compdef "_dnscontrol" "{{.App.Name}}"
|
# Run the function the first time we are auto-loaded, otherwise the very first
|
||||||
|
# complete wouldn't work in each shell session
|
||||||
|
# Otherwise assume we are directly sourced and register the completion
|
||||||
|
# (This is done by the #compdef directive in the autoloaded case.)
|
||||||
|
if [[ "${zsh_eval_context[-1]}" == "loadautofunc" ]]; then
|
||||||
|
_dnscontrol "$@"
|
||||||
|
else
|
||||||
|
compdef "_dnscontrol" "dnscontrol"
|
||||||
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue