diff --git a/_examples/shell/main.go b/_examples/shell/main.go index db30871..f760d49 100644 --- a/_examples/shell/main.go +++ b/_examples/shell/main.go @@ -13,7 +13,7 @@ var CLI struct { Debug bool `help:"Debug mode."` Rm struct { - User string `help:"Run as user." short:"u"` + User string `help:"Run as user." short:"u" default:"default"` Force bool `help:"Force removal." short:"f"` Recursive bool `help:"Recursively remove files." short:"r"` diff --git a/help_test.go b/help_test.go index 83747f1..731bf98 100644 --- a/help_test.go +++ b/help_test.go @@ -50,7 +50,7 @@ func TestHelp(t *testing.T) { }) require.True(t, exited) t.Log(w.String()) - require.Equal(t, `usage: test-app --required + require.Equal(t, `usage: test-app --required A test app. diff --git a/model.go b/model.go index 4f7375d..70f446b 100644 --- a/model.go +++ b/model.go @@ -89,6 +89,8 @@ func (n *Node) Summary() string { } if len(args) != 0 { summary += " " + strings.Join(args, " ") + } else if len(n.Children) > 0 { + summary += " " } return summary }