diff --git a/cmd/cmd.go b/cmd/cmd.go index b8044fe63..1d606a4d4 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -486,6 +486,9 @@ func AddBackendFlags() { help = help[:nl] } help = strings.TrimSpace(help) + if opt.IsPassword { + help += " (obscured)" + } flag := pflag.CommandLine.VarPF(opt, name, opt.ShortOpt, help) if _, isBool := opt.Default.(bool); isBool { flag.NoOptDefVal = "true" diff --git a/cmd/help.go b/cmd/help.go index 509a8e739..b73a09bea 100644 --- a/cmd/help.go +++ b/cmd/help.go @@ -325,6 +325,9 @@ func showBackend(name string) { } fmt.Printf("#### --%s%s\n\n", opt.FlagName(backend.Prefix), shortOpt) fmt.Printf("%s\n\n", opt.Help) + if opt.IsPassword { + fmt.Printf("**NB** Input to this must be obscured - see [rclone obscure](/commands/rclone_obscure/).\n\n") + } fmt.Printf("- Config: %s\n", opt.Name) fmt.Printf("- Env Var: %s\n", opt.EnvVarName(backend.Prefix)) fmt.Printf("- Type: %s\n", opt.Type())