mirror of https://github.com/docker/docs.git
Reformatting command-specific usage message
Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
This commit is contained in:
parent
d9ae6dd871
commit
6418fbb3d4
14
main.go
14
main.go
|
@ -32,6 +32,19 @@ Commands:
|
|||
Run '{{.Name}} COMMAND --help' for more information on a command.
|
||||
`
|
||||
|
||||
var CommandHelpTemplate = `
|
||||
Usage: docker-machine {{.Name}}{{if .Flags}} [OPTIONS]{{end}} [arg...]
|
||||
|
||||
{{.Usage}}{{if .Description}}
|
||||
|
||||
Description:
|
||||
{{.Description}}{{end}}{{if .Flags}}
|
||||
|
||||
Options:
|
||||
{{range .Flags}}{{.}}
|
||||
{{end}}{{ end }}
|
||||
`
|
||||
|
||||
func main() {
|
||||
for _, f := range os.Args {
|
||||
if f == "-D" || f == "--debug" || f == "-debug" {
|
||||
|
@ -41,6 +54,7 @@ func main() {
|
|||
}
|
||||
|
||||
cli.AppHelpTemplate = AppHelpTemplate
|
||||
cli.CommandHelpTemplate = CommandHelpTemplate
|
||||
app := cli.NewApp()
|
||||
app.Name = path.Base(os.Args[0])
|
||||
app.Author = "Docker Machine Contributors"
|
||||
|
|
Loading…
Reference in New Issue