mirror of
https://github.com/spf13/cobra
synced 2025-01-30 15:36:47 +00:00
Apply suggestions from code review
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
This commit is contained in:
parent
33e3ac194f
commit
b4f26aebb9
1 changed files with 2 additions and 2 deletions
|
@ -454,11 +454,11 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
|
|||
return finalCmd, completions, directive, nil
|
||||
}
|
||||
} else {
|
||||
directive = ShellCompDirectiveDefault
|
||||
|
||||
customShellCompDirective := finalCmd.CompletionOptions.DefaultShellCompDirective
|
||||
if customShellCompDirective != ShellCompDirectiveDefault {
|
||||
directive = customShellCompDirective
|
||||
} else {
|
||||
directive = ShellCompDirectiveDefault
|
||||
}
|
||||
|
||||
if flag == nil {
|
||||
|
|
Loading…
Reference in a new issue