Format help for all commands

This commit is contained in:
Harshavardhana
2015-08-25 20:13:50 -07:00
parent fa3631710f
commit cbc9d96d50
10 changed files with 7 additions and 19 deletions
-1
View File
@@ -58,7 +58,6 @@ EXAMPLES:
4. Set folder to world readwrite (chmod 777) on local filesystem.
$ mc {{.Name}} public /shared/Music
`,
}
-1
View File
@@ -60,7 +60,6 @@ EXAMPLES:
5. Behave like operating system tool ‘cat’, used for shell aliases.
$ echo "Hello, World!" | mc --mimic cat
Hello, World!
`,
}
-1
View File
@@ -65,7 +65,6 @@ EXAMPLES:
5. Copy an object of non english characters to Amazon S3 cloud storage.
$ mc {{.Name}} 本語 s3:andoria/本語
`,
}
-1
View File
@@ -49,7 +49,6 @@ EXAMPLES:
2. Compare two different folders on a local filesystem.
$ mc {{.Name}} ~/Photos /Media/Backup/Photos
`,
}
-1
View File
@@ -69,7 +69,6 @@ EXAMPLES:
$ mc --mimic ls
...
[2015-05-19 17:28:22 PDT] 41B 本語.md
`,
}
-1
View File
@@ -62,7 +62,6 @@ EXAMPLES:
4. Mirror a local folder of non english character recursively to Amazon s3 cloud storage and Minio cloud storage.
$ mc {{.Name}} 本語/... s3:mylocaldocuments play:backup
`,
}
-1
View File
@@ -55,7 +55,6 @@ EXAMPLES:
3. Clear session
$ mc {{.Name}} clear [SESSION]|[all]
`,
}
-1
View File
@@ -59,7 +59,6 @@ EXAMPLES:
3. Generate list of URLs for sharing a folder recursively, with expiration of 1 hour each.
$ mc {{.Name}} https://s3.amazonaws.com/backup... 1h
`,
}
+2 -3
View File
@@ -42,11 +42,10 @@ USAGE:
EXAMPLES:
1. Check for new official releases
$ mc update release
$ mc {{.Name}} release
2. Check for new experimental releases
$ mc update experimental
$ mc {{.Name}} experimental
`,
}
+5 -8
View File
@@ -38,17 +38,14 @@ USAGE:
mc {{.Name}} {{if .Description}}
DESCRIPTION:
{{.Description}}{{end}}{{if .Flags}}
FLAGS:
{{range .Flags}}{{.}}
{{end}}{{ end }}
EXAMPLES:
{{.Description}}{{end}}
`,
}
func mainVersion(ctxx *cli.Context) {
func mainVersion(ctx *cli.Context) {
if ctx.Args().First() == "help" {
cli.ShowCommandHelpAndExit(ctx, "version", 1) // last argument is exit code
}
t, _ := time.Parse(time.RFC3339Nano, Version)
if t.IsZero() {
console.Println("")