Skip to content

When prompting for a password, properly inform the terminal #865

@oliverpool

Description

@oliverpool

Is your feature request related to a problem? Please describe.

Some terminals like ghostty or iTerm have specific security features when they identify that a password is being requested.
See ghostty-org/ghostty#3980. The lock shown in the screencast is the goal of this feature request (it prevent focus stealing I think).

Describe the solution you'd like

Either adjust the textinput or create a new passwordinput package to handle this usecase.

Describe alternatives you've considered

Manually performing the right syscalls (using unix.IoctlSetTermios to set ICANON maybe?).

Additional context

https://github.com/ghostty-org/ghostty/blob/1805a9cb87aa08a721575842389e426e15bbada2/src/termio/Exec.zig#L364-L366

        // We assume we're in some sort of password input if we're
        // in canonical mode and not echoing. This is a heuristic.
        const password_input = mode.canonical and !mode.echo;

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions