linenoise
linenoise copied to clipboard
New feature: Support hidden input (for passwords and the like).
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.
Rebased code pushed
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.