Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use stderr instead of stdout if stdout is not a TTY #7

Merged

Conversation

MasterofJOKers
Copy link
Contributor

This was the default behavior before
prompt-toolkit/python-prompt-toolkit@2c96fe2
switched the default behavior to output plain text instead. Since we're
showing a menu and requiring selection, using stderr as fallback is
preferred to outputting plain text to stdout. This enables use-cases
where the main command's output gets piped to a pager, with the
selection necessary for generating that output still working.

This was the default behavior before
prompt-toolkit/python-prompt-toolkit@2c96fe2
 switched the default behavior to output plain text instead. Since we're
 showing a menu and requiring selection, using stderr as fallback is
 preferred to outputting plain text to stdout. This enables use-cases
 where the main command's output gets piped to a pager, with the
 selection necessary for generating that output still working.
@MasterofJOKers MasterofJOKers force-pushed the prompt-toolkit-always-prefer-tty branch from 0684e49 to 4537b71 Compare June 6, 2023 22:04
@sebageek sebageek merged commit 36bb4ab into sebageek:master Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants