Skip to content

Commit 98e4057

Browse files
committed
Properly handle no man page found case
1 parent ae5ea63 commit 98e4057

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cmd/explainshell.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ func printHelp() {
9393
func printCommandHelp(help *esweb.CommandHelp, colors bool) {
9494
fmt.Println("Source: " + help.Source + "\n")
9595

96+
if len(help.Parts) == 0 {
97+
fmt.Println(cmd.Bold("No man page found."))
98+
return
99+
}
100+
96101
colorIndex := 0
97102
for i, part := range help.Parts {
98103
if i == 0 {

0 commit comments

Comments
 (0)