linenoise icon indicating copy to clipboard operation
linenoise copied to clipboard

New feature: Support hidden input (for passwords and the like).

Open andreas-kupries opened this issue 12 years ago • 2 comments
trafficstars

Controlled by internal global flag variable "is_hidden". Added two new accessor functions to set and retrieve the flag's state. (Avoided changing the signature of linenoise()).

Activating hidden input

  • Causes all entered characters to be echoed back as '*'.
  • Disables navigating and searching the history.
  • Disables line completion.
  • All other editing commands are left active.

andreas-kupries avatar Jan 25 '13 21:01 andreas-kupries

Rebased code pushed

andreas-kupries avatar Feb 21 '13 00:02 andreas-kupries

I still need to convince myself that there is enough value-add in this feature. Since history, and to a lesser extent editing, don't make sense for hidden input I'm not certain there is enough value here for it to be part of linenoise.

I will think about it a bit more though.

msteveb avatar Feb 21 '13 21:02 msteveb