bevry / dorothy

🧙🏻‍♀️ Bring your dotfile commands and configuration to any shell. Sensible defaults and hundreds of commands preloaded. Supports Bash, Zsh, Fish, Nu, Xonsh, Elvish, Dash, KornShell, macOS, Linux, Windows.
Other
277 stars 21 forks source link

Suggestion: ask: `--password` should use `read --silent` with a confirm password prompt #227

Open balupton opened 1 month ago

balupton commented 1 month ago

Currently if one uses ask --password it just prevents it from being outputted after being entered, however read (at least on macos) supports --silent which obfuscates what is entered with dots.... If Dorothy were to change ask to use this mode, then ask will need to verify the characters were entered with an additional confirm prompt. This may be a few days of work, which currently has no requirement in Dorothy currently. If someone needs this, post below.

balupton commented 1 month ago

In addition, could do some hotkey combination such as a SIG* in which it cancels the silent read and uses a prefilled read with the entered characters now visible.

balupton commented 1 month ago

Perhaps a --conceal flag makes sense for this, in which a --secret flag enables both password and conceal.

Will also need a --confirm-repeat flag, as sometimes we don't care for the confirm, as an external program validates.