Skip to content

Commit

Permalink
Do not pass command name to --completion-bash arguments in ZSH temp…
Browse files Browse the repository at this point in the history
…late
  • Loading branch information
gzdunek authored and alecthomas committed May 13, 2023
1 parent b4b1df3 commit 4702584
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ complete -F _{{.App.Name}}_bash_autocomplete -o default {{.App.Name}}
var ZshCompletionTemplate = `#compdef {{.App.Name}}
_{{.App.Name}}() {
local matches=($(${words[1]} --completion-bash "${(@)words[1,$CURRENT]}"))
local matches=($(${words[1]} --completion-bash "${(@)words[2,$CURRENT]}"))
compadd -a matches
if [[ $compstate[nmatches] -eq 0 && $words[$CURRENT] != -* ]]; then
Expand Down

0 comments on commit 4702584

Please sign in to comment.