Don't enable test mode by TERM=dumb
tompng opened this issue · comments
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.
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.
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.
If we're doing this, we also need to disable ▽ and "\e[6n" (Query Cursor Position) if TERM=dumb.