Skip to content

More gradual sudo prompt transition #1474

@squell

Description

@squell

Describe the feature you'd like see implemented in sudo-rs
Strip a trailing : and prefixing [sudo] block from a given SUDO_PROMPT

What problem can be solved with this feature?
Would get rid of users that have customised their ogsudo prompt seeing e.g. [sudo: [sudo] password:] PAMPROMPT: but instead would show [sudo: password] PAMPROMPT which is passable.

Additional context
This would allow users that have customised prompts a better user experience when switching between sudo-rs and ogsudo. Won't solve any issues with software relying on the password prompt looking a certain way.

For --prompt we could implement the same check, but I think it's mostly relevant for the environment variable.

Also see #1267

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