Skip to content

Commit

Permalink
Merge pull request #54 from GaMoCh/fix-zsh-template
Browse files Browse the repository at this point in the history
Do not pass command name to --completion-bash argument in ZSH template
  • Loading branch information
ripienaar authored Jan 2, 2025
2 parents 9e56157 + 896c2e6 commit 814c2a8
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 @@ -387,7 +387,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 814c2a8

Please sign in to comment.