From b4f26aebb91f267bd595ade69839ac998f2e1dce Mon Sep 17 00:00:00 2001 From: Harald Albers Date: Tue, 21 Jan 2025 09:10:52 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com> --- completions.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completions.go b/completions.go index 0c5c2ec..b404322 100644 --- a/completions.go +++ b/completions.go @@ -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 {