From 24b4b01ffae1d5d272e44cd4e0b1ae9e810f0831 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Fri, 11 Sep 2015 18:18:36 -0400 Subject: [PATCH] Do not cound "help" as "Available" --- command.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/command.go b/command.go index 4569fe5a..62775c9a 100644 --- a/command.go +++ b/command.go @@ -857,6 +857,10 @@ func (c *Command) IsAvailableCommand() bool { return false } + if c.HasParent() && c.Parent().helpCommand == c { + return false + } + if c.Runnable() || c.HasAvailableSubCommands() { return true }