mirror of
https://github.com/TangentFoxy/argparse.git
synced 2025-07-28 02:52:20 +00:00
Zsh completions: use #compdef <program>
This means zsh scripts can't be sourced, but they can be automatically loaded from files which is the standard way of doing it.
This commit is contained in:
@@ -86,7 +86,7 @@ complete -F _comptest -o bashdefault -o default comptest
|
||||
|
||||
it("generates correct zsh completion script", function()
|
||||
assert.equal([=[
|
||||
compdef _comptest comptest
|
||||
#compdef comptest
|
||||
|
||||
_comptest() {
|
||||
local context state state_descr line
|
||||
@@ -179,6 +179,8 @@ _comptest_admin_cmds() {
|
||||
)
|
||||
_describe "command" commands
|
||||
}
|
||||
|
||||
_comptest
|
||||
]=], get_output("completion zsh"))
|
||||
end)
|
||||
|
||||
|
Reference in New Issue
Block a user