global alias option
This commit is contained in:
+8
-4
@@ -41,6 +41,14 @@ var commands = []cli.Command{
|
||||
// Collection of mc flags currently supported
|
||||
var (
|
||||
flags = []cli.Flag{
|
||||
cli.BoolFlag{
|
||||
Name: "quiet, q",
|
||||
Usage: "Supress chatty console output",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "alias",
|
||||
Usage: "Mimic operating system toolchain behavior wherever it makes sense",
|
||||
},
|
||||
cli.StringFlag{
|
||||
Name: "theme",
|
||||
Value: console.GetDefaultThemeName(),
|
||||
@@ -63,10 +71,6 @@ var (
|
||||
Name: "debug",
|
||||
Usage: "Enable HTTP tracing",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "quiet, q",
|
||||
Usage: "Supress chatty console output",
|
||||
},
|
||||
// Add your new flags starting here
|
||||
}
|
||||
)
|
||||
|
||||
+2
-1
@@ -18,9 +18,10 @@
|
||||
package main
|
||||
|
||||
var (
|
||||
globalDebugFlag = false // Debug flag set via command line
|
||||
globalQuietFlag = false // Quiet flag set via command line
|
||||
globalAliasFlag = false // Alias flag set via command line
|
||||
globalJSONFlag = false // Json flag set via command line
|
||||
globalDebugFlag = false // Debug flag set via command line
|
||||
|
||||
mcCurrentConfigVersion = "1.0.0"
|
||||
)
|
||||
|
||||
@@ -107,6 +107,7 @@ func main() {
|
||||
app.Author = "Minio.io"
|
||||
app.Before = func(ctx *cli.Context) error {
|
||||
globalQuietFlag = ctx.GlobalBool("quiet")
|
||||
globalAliasFlag = ctx.GlobalBool("alias")
|
||||
globalDebugFlag = ctx.GlobalBool("debug")
|
||||
globalJSONFlag = ctx.GlobalBool("json")
|
||||
if globalDebugFlag {
|
||||
|
||||
Reference in New Issue
Block a user