Merge pull request #150 from eparis/help-not-available

Do not count "help" as "Available"
This commit is contained in:
Eric Paris 2015-09-11 17:46:27 -05:00
commit 0d9b07baf9

View file

@ -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
}