Skip to content

Commit 0eaa9d5

Browse files
committed
Only show separator if command has usage text
1 parent c32fd20 commit 0eaa9d5

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)