Tighten up restriction on SHELL match
This commit is contained in:
parent
56837b07d3
commit
f3ef95f8cc
2
help.go
2
help.go
@ -102,7 +102,7 @@ func printCommandSuggestions(commands []*Command, writer io.Writer) {
|
|||||||
if command.Hidden {
|
if command.Hidden {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
if strings.Contains(os.Getenv("SHELL"), "zsh") {
|
if strings.HasSuffix(os.Getenv("SHELL"), "zsh") {
|
||||||
for _, name := range command.Names() {
|
for _, name := range command.Names() {
|
||||||
_, _ = fmt.Fprintf(writer, "%s:%s\n", name, command.Usage)
|
_, _ = fmt.Fprintf(writer, "%s:%s\n", name, command.Usage)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user