Skip to content

Commit

Permalink
Tighten up restriction on SHELL match
Browse files Browse the repository at this point in the history
  • Loading branch information
meatballhat committed Apr 30, 2022
1 parent 56837b0 commit f3ef95f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion help.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit f3ef95f

Please sign in to comment.