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

Change Reline::ANSI to a general io #659

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tompng
Copy link
Member

@tompng tompng commented Mar 23, 2024

Fixes #537, #616 and #690, the behavior will be more similar to Readline's behavior.

Reline::ANSI already partially supports non-tty env, but not fully.
Reline::GeneralIO is a completely unusable IOGate which is only used for testing. The implementation is not a general io.

This pull request changes Reline::ANSI to a general io that supports both tty and non-tty environment.
Reline::GeneralIO will be renamed to Reline::TestDumbIO because it is not a GeneralIO, it is not a DumbIO. It is not optimized for dumb terminal, just outputs ascii characters with unusable repetition.

@tompng tompng force-pushed the ansi_is_general_io branch 2 times, most recently from d5d4994 to bd69658 Compare April 3, 2024 17:22
@ima1zumi ima1zumi added the bug Something isn't working label Apr 5, 2024
@tompng tompng force-pushed the ansi_is_general_io branch 3 times, most recently from baa398f to cb72da1 Compare April 8, 2024 05:36
Reline::ANSI has a partial non-tty supporting code. It should be a general io.
Reline::GeneralIO should be renamed because it is actually not a general io but an unusable io only for test usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

Reline.readline does not work if STDOUT is a tty and STDIN is not a tty
2 participants