From d9ae6dd87166a541454cc89bccfa0208e7db6faa Mon Sep 17 00:00:00 2001
From: Dave Henderson <Dave.Henderson@ca.ibm.com>
Date: Tue, 28 Apr 2015 12:31:39 -0400
Subject: [PATCH] Reformatting usage message to look more like docker's

Signed-off-by: Dave Henderson <Dave.Henderson@ca.ibm.com>
---
 main.go | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/main.go b/main.go
index d9e1223dbd..8ed327b101 100644
--- a/main.go
+++ b/main.go
@@ -12,6 +12,26 @@ import (
 	"github.com/docker/machine/version"
 )
 
+var AppHelpTemplate = `
+Usage: {{.Name}} {{if .Flags}}[OPTIONS] {{end}}COMMAND [arg...]
+
+{{.Usage}}
+
+Version: {{.Version}}{{if or .Author .Email}}
+
+Author:{{if .Author}}
+  {{.Author}}{{if .Email}} - <{{.Email}}>{{end}}{{else}}
+  {{.Email}}{{end}}{{end}}
+{{if .Flags}}
+Options:
+  {{range .Flags}}{{.}}
+  {{end}}{{end}}
+Commands:
+  {{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}}
+  {{end}}
+Run '{{.Name}} COMMAND --help' for more information on a command.
+`
+
 func main() {
 	for _, f := range os.Args {
 		if f == "-D" || f == "--debug" || f == "-debug" {
@@ -20,6 +40,7 @@ func main() {
 		}
 	}
 
+	cli.AppHelpTemplate = AppHelpTemplate
 	app := cli.NewApp()
 	app.Name = path.Base(os.Args[0])
 	app.Author = "Docker Machine Contributors"