cmd: Note commands which need obscured input in the docs - fixes #4252

This commit is contained in:
Nick Craig-Wood
2020-05-31 12:57:28 +01:00
parent cbfe7a405b
commit 8774381e2e
2 changed files with 6 additions and 0 deletions

View File

@@ -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"