Tighten up restriction on SHELL match

main
Dan Buch 2 years ago
parent 56837b07d3
commit f3ef95f8cc
Signed by: meatballhat
GPG Key ID: A12F782281063434

@ -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)
}

Loading…
Cancel
Save