Apply suggestions from code review

Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
This commit is contained in:
Harald Albers 2025-01-21 09:10:52 +01:00 committed by GitHub
parent 33e3ac194f
commit b4f26aebb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -454,11 +454,11 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
return finalCmd, completions, directive, nil return finalCmd, completions, directive, nil
} }
} else { } else {
directive = ShellCompDirectiveDefault
customShellCompDirective := finalCmd.CompletionOptions.DefaultShellCompDirective customShellCompDirective := finalCmd.CompletionOptions.DefaultShellCompDirective
if customShellCompDirective != ShellCompDirectiveDefault { if customShellCompDirective != ShellCompDirectiveDefault {
directive = customShellCompDirective directive = customShellCompDirective
} else {
directive = ShellCompDirectiveDefault
} }
if flag == nil { if flag == nil {