-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
InquirerPy currently disables all colors automatically if the env var NO_COLOR is set. This seems to be thanks to prompt-toolkit/python-prompt-toolkit#1756
I am trying to find a way to manually disable all colors as described in Command Line Interface Guidelines.
Here is what I already tried:
inquirer_style = get_style({}, style_override=state.no_color)
...
inquirer.text(
message="Input",
validate=EmptyInputValidator(),
style=inquirer_style,
).execute()This seems to work for the most part, however, validation messages (such as "Input cannot be empty" in this case) still show color. These same validation messages do not show color when the environment variable NO_COLOR is set in accordance to https://no-color.org/
I realize this might not be possible at your end. And if so, I can also open an issue in the prompt toolkit repo to see if they can help with this.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels