mirror of
https://github.com/rclone/rclone
synced 2024-11-23 00:06:55 +01:00
cmd: Note commands which need obscured input in the docs - fixes #4252
This commit is contained in:
parent
cbfe7a405b
commit
8774381e2e
@ -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"
|
||||
|
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user