Skip to content

Commit fa7e0b1

Browse files
authored
Merge pull request #2247 from mikecluck/remove-redundant-separator
Only show separator if command has usage text
2 parents 07f2236 + 052838d commit fa7e0b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

help.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func printCommandSuggestions(commands []*Command, writer io.Writer) {
188188
if command.Hidden {
189189
continue
190190
}
191-
if strings.HasSuffix(os.Getenv("SHELL"), "zsh") {
191+
if strings.HasSuffix(os.Getenv("SHELL"), "zsh") && len(command.Usage) > 0 {
192192
_, _ = fmt.Fprintf(writer, "%s:%s\n", command.Name, command.Usage)
193193
} else {
194194
_, _ = fmt.Fprintf(writer, "%s\n", command.Name)

0 commit comments

Comments
 (0)