Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 6e6ee58

Browse files
committed
Update help text of generate command
1 parent 81e145b commit 6e6ee58

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

internals/secrethub/generate.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,11 @@ func NewGenerateSecretCommand(io ui.IO, newClient newClientFunc) *GenerateSecret
6161
// Register registers the command, arguments and flags on the provided Registerer.
6262
func (cmd *GenerateSecretCommand) Register(r command.Registerer) {
6363
clause := r.Command("generate", "Generate a random secret.")
64-
clause.HelpLong("By default, it uses numbers (0-9), lowercase letters (a-z) and uppercase letters (A-Z) and a length of 22.")
6564
clause.Arg("secret-path", "The path to write the generated secret to").Required().PlaceHolder(secretPathPlaceHolder).StringVar(&cmd.firstArg)
6665
clause.Flag("length", "The length of the generated secret. Defaults to "+strconv.Itoa(defaultLength)).PlaceHolder(strconv.Itoa(defaultLength)).Short('l').SetValue(&cmd.lengthFlag)
67-
clause.Flag("min", "<charset>:<n> Ensure that the resulting password contains at least n characters from the given character set.").SetValue(&cmd.mins)
66+
clause.Flag("min", "<charset>:<n> Ensure that the resulting password contains at least n characters from the given character set. Note that adding constrains reduces the strength of the secret. When possible, avoid any constraints.").SetValue(&cmd.mins)
6867
clause.Flag("clip", "Copy the generated value to the clipboard. The clipboard is automatically cleared after "+units.HumanDuration(cmd.clearClipboardAfter)+".").Short('c').BoolVar(&cmd.copyToClipboard)
69-
clause.Flag("charset", "Define the set of characters to randomly choose a password from. Defaults to alphanumeric.").Default("alphanumeric").SetValue(&cmd.charsetFlag)
68+
clause.Flag("charset", "Define the sets of characters to randomly generate a password from (e.g. all, numeric, letters, symbols, human-readable...). Multiple character sets can be provided in a comma separated list. Defaults to alphanumeric.").Default("alphanumeric").HintOptions("all", "numeric", "lowercase", "uppercase", "letters", "symbols", "human-readable").SetValue(&cmd.charsetFlag)
7069
clause.Flag("symbols", "Include symbols in secret.").Short('s').Hidden().SetValue(&cmd.symbolsFlag)
7170
clause.Arg("rand-command", "").Hidden().StringVar(&cmd.secondArg)
7271
clause.Arg("length", "").Hidden().SetValue(&cmd.lengthArg)

0 commit comments

Comments
 (0)