aboutsummaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/codegangsta/cli/help.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-25 04:25:11 +0800
committerobscuren <geffobscura@gmail.com>2015-03-25 04:25:11 +0800
commit3d5f48a1602a2dbe6d9a4d123e5b3aa4f51d53a1 (patch)
treee6692d3c0de3bacfe02d0114bfdbea5a866ca7ad /Godeps/_workspace/src/github.com/codegangsta/cli/help.go
parenta6e659f74b199d2caec54a00916217ec5439c05b (diff)
downloadgo-tangerine-3d5f48a1602a2dbe6d9a4d123e5b3aa4f51d53a1.tar
go-tangerine-3d5f48a1602a2dbe6d9a4d123e5b3aa4f51d53a1.tar.gz
go-tangerine-3d5f48a1602a2dbe6d9a4d123e5b3aa4f51d53a1.tar.bz2
go-tangerine-3d5f48a1602a2dbe6d9a4d123e5b3aa4f51d53a1.tar.lz
go-tangerine-3d5f48a1602a2dbe6d9a4d123e5b3aa4f51d53a1.tar.xz
go-tangerine-3d5f48a1602a2dbe6d9a4d123e5b3aa4f51d53a1.tar.zst
go-tangerine-3d5f48a1602a2dbe6d9a4d123e5b3aa4f51d53a1.zip
updated deps
Diffstat (limited to 'Godeps/_workspace/src/github.com/codegangsta/cli/help.go')
-rw-r--r--Godeps/_workspace/src/github.com/codegangsta/cli/help.go25
1 files changed, 12 insertions, 13 deletions
diff --git a/Godeps/_workspace/src/github.com/codegangsta/cli/help.go b/Godeps/_workspace/src/github.com/codegangsta/cli/help.go
index 8d176556a..7c4f81be6 100644
--- a/Godeps/_workspace/src/github.com/codegangsta/cli/help.go
+++ b/Godeps/_workspace/src/github.com/codegangsta/cli/help.go
@@ -15,10 +15,10 @@ VERSION:
{{.Version}}
AUTHOR(S):
- {{range .Authors}}{{ . }} {{end}}
-
+ {{range .Authors}}{{ . }}
+ {{end}}
COMMANDS:
- {{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}}
+ {{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
{{end}}{{if .Flags}}
GLOBAL OPTIONS:
{{range .Flags}}{{.}}
@@ -52,7 +52,7 @@ USAGE:
{{.Name}} command{{if .Flags}} [command options]{{end}} [arguments...]
COMMANDS:
- {{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}}
+ {{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
{{end}}{{if .Flags}}
OPTIONS:
{{range .Flags}}{{.}}
@@ -60,9 +60,9 @@ OPTIONS:
`
var helpCommand = Command{
- Name: "help",
- ShortName: "h",
- Usage: "Shows a list of commands or help for one command",
+ Name: "help",
+ Aliases: []string{"h"},
+ Usage: "Shows a list of commands or help for one command",
Action: func(c *Context) {
args := c.Args()
if args.Present() {
@@ -74,9 +74,9 @@ var helpCommand = Command{
}
var helpSubcommand = Command{
- Name: "help",
- ShortName: "h",
- Usage: "Shows a list of commands or help for one command",
+ Name: "help",
+ Aliases: []string{"h"},
+ Usage: "Shows a list of commands or help for one command",
Action: func(c *Context) {
args := c.Args()
if args.Present() {
@@ -102,9 +102,8 @@ func ShowAppHelp(c *Context) {
// Prints the list of subcommands as the default app completion method
func DefaultAppComplete(c *Context) {
for _, command := range c.App.Commands {
- fmt.Fprintln(c.App.Writer, command.Name)
- if command.ShortName != "" {
- fmt.Fprintln(c.App.Writer, command.ShortName)
+ for _, name := range command.Names() {
+ fmt.Fprintln(c.App.Writer, name)
}
}
}