Skip to content

Commit

Permalink
use cmd.Name when generating completion script (#2012)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartekpacia authored Nov 25, 2024
1 parent 588ada5 commit 6d4e81c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion command.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ func (cmd *Command) setupDefaults(osArgs []string) {
}

if cmd.EnableShellCompletion || cmd.Root().shellCompletion {
completionCommand := buildCompletionCommand(osArgs[0])
completionCommand := buildCompletionCommand(cmd.Name)

if cmd.ShellCompletionCommandName != "" {
tracef(
Expand Down

0 comments on commit 6d4e81c

Please sign in to comment.