-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
- I've checked docs and closed issues for possible solutions.
- I can't find my issue in the FAQ.
Describe the bug
Using prompt.Prompt.ask(...) to require a password will call str.strip() on the input. Therefore any leading or trailing spaces will be deleted from the provided password.
>>> from rich.prompt import Prompt
>>> foo = Prompt.ask("Pass?", password=True)
Pass?: # Enter '123 ' at the prompt
>>> repr(foo)
"'123'" # Trailing space is missingSee pull request #3932 for more details.