Rename --alias to --mimic, remove --force flag
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ EXAMPLES:
|
||||
|
||||
func mainCat(ctx *cli.Context) {
|
||||
stdinMode := false
|
||||
if globalAliasFlag {
|
||||
if globalMimicFlag {
|
||||
if !ctx.Args().Present() {
|
||||
stdinMode = true
|
||||
}
|
||||
|
||||
@@ -42,13 +42,8 @@ var (
|
||||
Usage: "Suppress chatty console output",
|
||||
}
|
||||
|
||||
forceFlag = cli.BoolFlag{
|
||||
Name: "force",
|
||||
Usage: "Force copying when destination exists",
|
||||
}
|
||||
|
||||
aliasFlag = cli.BoolFlag{
|
||||
Name: "alias",
|
||||
mimicFlag = cli.BoolFlag{
|
||||
Name: "mimic",
|
||||
Usage: "Mimic operating system toolchain behavior wherever it makes sense",
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -19,8 +19,7 @@ package main
|
||||
|
||||
var (
|
||||
globalQuietFlag = false // Quiet flag set via command line
|
||||
globalForceFlag = false // Force flag set via command line
|
||||
globalAliasFlag = false // Alias flag set via command line
|
||||
globalMimicFlag = false // Unix flag set via command line
|
||||
globalJSONFlag = false // Json flag set via command line
|
||||
globalDebugFlag = false // Debug flag set via command line
|
||||
|
||||
|
||||
+1
-1
@@ -72,7 +72,7 @@ EXAMPLES:
|
||||
// mainList - is a handler for mc ls command
|
||||
func mainList(ctx *cli.Context) {
|
||||
args := ctx.Args()
|
||||
if globalAliasFlag {
|
||||
if globalMimicFlag {
|
||||
if !ctx.Args().Present() {
|
||||
args = []string{"."}
|
||||
}
|
||||
|
||||
@@ -76,8 +76,7 @@ func getSystemData() map[string]string {
|
||||
func registerBefore(ctx *cli.Context) error {
|
||||
setMcConfigDir(ctx.GlobalString("conf-dir"))
|
||||
globalQuietFlag = ctx.GlobalBool("quiet")
|
||||
globalForceFlag = ctx.GlobalBool("force")
|
||||
globalAliasFlag = ctx.GlobalBool("alias")
|
||||
globalMimicFlag = ctx.GlobalBool("mimic")
|
||||
globalDebugFlag = ctx.GlobalBool("debug")
|
||||
globalJSONFlag = ctx.GlobalBool("json")
|
||||
themeName := ctx.GlobalString("theme")
|
||||
@@ -120,8 +119,7 @@ func registerApp() *cli.App {
|
||||
// register all the flags
|
||||
registerFlag(configFlag) // path to config folder
|
||||
registerFlag(quietFlag) // suppress console output
|
||||
registerFlag(forceFlag) // force copying data
|
||||
registerFlag(aliasFlag) // OS toolchain mimic
|
||||
registerFlag(mimicFlag) // OS toolchain mimic
|
||||
registerFlag(themeFlag) // console theme flag
|
||||
registerFlag(jsonFlag) // json formatted output
|
||||
registerFlag(debugFlag) // enable debugging output
|
||||
|
||||
Reference in New Issue
Block a user