promptui
promptui copied to clipboard
Provide a 'true' password prompt by hiding the amount of characters entered
By default when only providing a Prompt.Mask
character, it is impossible to hide the amount of characters entered as you cannot enter either an ''
(empty rune), or the 0
(null terminator).
The most backwards compatible way to fix this is by introducing a new Prompt.Password bool
field that when set, defaults the Prompt.Mask
to the 0
, allowing promptui to completely hide the text entered, as is common in password prompts on the terminal.
Any chance of getting this included in a next release? Anything that needs working on?
It looks like this behavior can be achieved by setting prompt.Mask
to a space (
) character. See #133
Correct, never noticed that!. Thanks