Format help for all commands
This commit is contained in:
@@ -58,7 +58,6 @@ EXAMPLES:
|
||||
|
||||
4. Set folder to world readwrite (chmod 777) on local filesystem.
|
||||
$ mc {{.Name}} public /shared/Music
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,6 @@ EXAMPLES:
|
||||
5. Behave like operating system tool ‘cat’, used for shell aliases.
|
||||
$ echo "Hello, World!" | mc --mimic cat
|
||||
Hello, World!
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ EXAMPLES:
|
||||
|
||||
5. Copy an object of non english characters to Amazon S3 cloud storage.
|
||||
$ mc {{.Name}} 本語 s3:andoria/本語
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,6 @@ EXAMPLES:
|
||||
|
||||
2. Compare two different folders on a local filesystem.
|
||||
$ mc {{.Name}} ~/Photos /Media/Backup/Photos
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,6 @@ EXAMPLES:
|
||||
$ mc --mimic ls
|
||||
...
|
||||
[2015-05-19 17:28:22 PDT] 41B 本語.md
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,6 @@ EXAMPLES:
|
||||
|
||||
3. Clear session
|
||||
$ mc {{.Name}} clear [SESSION]|[all]
|
||||
|
||||
`,
|
||||
}
|
||||
|
||||
|
||||
@@ -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
@@ -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
@@ -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("")
|
||||
|
||||
Reference in New Issue
Block a user