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

Don't enable test mode by TERM=dumb #660

Open
tompng opened this issue Mar 23, 2024 · 3 comments
Open

Don't enable test mode by TERM=dumb #660

tompng opened this issue Mar 23, 2024 · 3 comments

Comments

@tompng
Copy link
Member

tompng commented Mar 23, 2024

Problem

In IRB's test code, TERM=dumb triggers Reline's test mode io Reline::GeneralIO (unlike the name, this is not a general io)

In practice, TERM=dumb seems to be used in real world. (example: pry/pry#2303)
It will unintentionally enables Reline's test mode and cause problems.

I think Reline should not use TERM=dumb to enable test mode. We need another way to enable it, or remove this test mode after fixing IRB's test not to depend on this.

@tompng tompng changed the title Enable test mode not by TERM=dumb Don't enable test mode by TERM=dumb Mar 23, 2024
@st0012
Copy link
Member

st0012 commented Mar 23, 2024

I haven't looked much into the issue yet, but we need to be very cautious about this change because many projects, like Rails and debug, use TERM=dumb to turn on the Reline test mode. If we did decide to implement this change, let's make sure we roll it out gradually (e.g. supporting both TERM=dumb and the alternative for a while) so we have time to help those projects updating their tests.

@dgutov
Copy link

dgutov commented Mar 23, 2024

FWIW, if we're talking about Reline inside Emacs, then removing special handling for TERM=dumb is not enough: if I just change those checks, that brings back the problem.

@tompng
Copy link
Member Author

tompng commented Mar 24, 2024

If we're doing this, we also need to disable ▽ and "\e[6n" (Query Cursor Position) if TERM=dumb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants