Skip to content

Format specifiers in SUDO_PROMPT are not expanded #1252

@Pu-Anlai

Description

@Pu-Anlai

Hellohello! While format specifiers set through the -p argument are expanded, for SUDO_PROMPT they are printed literally.

$> sudo-rs -p "password for %p" -s
[sudo: password for user] Password: ^C

$> SUDO_PROMPT="password for %p" sudo-rs -s
[sudo: password for %p] Password: ^C

Expected behavior
-p and SUDO_PROMPT behave in the same way.

On a related note: It would be great if the passprompt sudoers setting could be implemented as well.

And finally: Thank you so much for sudo-rs!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or requestgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions