Skip to content

Commit 4702584

Browse files
gzdunekalecthomas
authored andcommitted
Do not pass command name to --completion-bash arguments in ZSH template
1 parent b4b1df3 commit 4702584

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

templates.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ complete -F _{{.App.Name}}_bash_autocomplete -o default {{.App.Name}}
248248
var ZshCompletionTemplate = `#compdef {{.App.Name}}
249249
250250
_{{.App.Name}}() {
251-
local matches=($(${words[1]} --completion-bash "${(@)words[1,$CURRENT]}"))
251+
local matches=($(${words[1]} --completion-bash "${(@)words[2,$CURRENT]}"))
252252
compadd -a matches
253253
254254
if [[ $compstate[nmatches] -eq 0 && $words[$CURRENT] != -* ]]; then

0 commit comments

Comments
 (0)