From f3ef95f8ccf8a8d98d87a61009ff8690b0a7bf4a Mon Sep 17 00:00:00 2001 From: Dan Buch Date: Sat, 30 Apr 2022 14:16:54 -0400 Subject: [PATCH] Tighten up restriction on SHELL match --- help.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/help.go b/help.go index 1455689310..4b03abea1d 100644 --- a/help.go +++ b/help.go @@ -102,7 +102,7 @@ func printCommandSuggestions(commands []*Command, writer io.Writer) { if command.Hidden { continue } - if strings.Contains(os.Getenv("SHELL"), "zsh") { + if strings.HasSuffix(os.Getenv("SHELL"), "zsh") { for _, name := range command.Names() { _, _ = fmt.Fprintf(writer, "%s:%s\n", name, command.Usage) }