-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
repl: don't use tty control codes when $TERM is set to "dumb" #2712
Conversation
@saljam sorry about this, but could rebase this PR once against current master? |
Eh, I'm a little confused about what just happened. But sure, I just rebased. :) |
We had a happy little issue (#2713) which led us to force-pushing a few commits on top of master, and as your PR was based on one of the commits that was gone, it could no longer apply. The Github UI bugging out is another result of that. Also, CI of this PR here: https://ci.nodejs.org/job/node-test-pull-request/258/ |
I think this is pretty low-risk, but could you add a test? |
I can foresee a problem here. |
@Fishrock123 as far as I can tell, it also disables readline and the up-down-arrow history. Do we want readline on dumb terminals? If yes, I could just disable |
OK, I've switched to disabling |
LGTM. @saljam could you put a link into the commit log, and/or a comment in the code, to a reference on |
This change stops the REPL from using ANSI control codes for colours when the TERM environment variable is set to "dumb". "dumb" is the terminal type with the smallest set of capabilities as described by terminfo. http://invisible-island.net/ncurses/terminfo.ti.html#toc-_Specials Fixes nodejs/node-v0.x-archive#5344
@Fishrock123 done. PTAL. Git, hg, grep, &c all respect TERM=dumb, but surprisingly I couldn't find a clear definition other than in terminfo's source. |
LGTM |
This change stops the REPL from using ANSI control codes for colours when the TERM environment variable is set to "dumb". "dumb" is the terminal type with the smallest set of capabilities as described by terminfo. See: http://invisible-island.net/ncurses/terminfo.ti.html#toc-_Specials Related: nodejs/node-v0.x-archive#5344 Related: nodejs/node-v0.x-archive#25506 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> PR-URL: #2712
Thanks! And noted, somehow I convinced myself On Tue, 22 Sep 2015 20:44 silverwind notifications@github.com wrote:
|
In which case whoops! Sorry! (I can confirm it does work.) On Tue, 22 Sep 2015 20:52 silverwind notifications@github.com wrote:
|
This change stops the REPL from using ANSI control codes for colours when the TERM environment variable is set to "dumb". "dumb" is the terminal type with the smallest set of capabilities as described by terminfo. See: http://invisible-island.net/ncurses/terminfo.ti.html#toc-_Specials Related: nodejs/node-v0.x-archive#5344 Related: nodejs/node-v0.x-archive#25506 Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Roman Reiss <me@silverwind.io> PR-URL: #2712
This stops the REPL from using ANSI control codes on terminals
which don't support them. (Fixes nodejs/node-v0.x-archive#5344)
For history see nodejs/node-v0.x-archive#25506