Skip to content

console.input let password mode output a character #3725

@PlasmaHH

Description

@PlasmaHH

One of the annoying things with hidden password input is that you sometimes stumble and then are not sure how many chars you have entered yet, or if you want to start over hit backspace often enough etc.

Generally at least for me it feels like a nicer interaction if there is a character displayed for every keystroke.

For that purpose I wrote me some contraption using readchar but it feels like it would also fit into rich.prompt and rich.console.input much nicer.

PS: For the case of adopting single char input one could also imagine adapting rich.prompt so that it can update the prompt based on the contents, like on many web forms where it says "password too short" or "must contain XYZ" using some user defined callbacks/callables

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions