repl: don't use tty control codes when $TERM is set to "dumb"
authorSalman Aljammaz <s@0x65.net>
Sat, 5 Sep 2015 15:03:46 +0000 (18:03 +0300)
committerRod Vagg <rod@vagg.org>
Tue, 22 Sep 2015 22:39:33 +0000 (08:39 +1000)
commit9760e04839210d05bcf8bc6b883f5034ab5b0634
treeb02e0cc91b81471ecbdeaed0bc6102735bddfa00
parentf68fed2e6ff008cd0464831d4b1f081be1f65efc
repl: don't use tty control codes when $TERM is set to "dumb"

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: https://github.com/nodejs/node-v0.x-archive/issues/5344
Related: https://github.com/nodejs/node-v0.x-archive/pull/25506
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
PR-URL: https://github.com/nodejs/node/pull/2712
lib/internal/repl.js
test/parallel/test-repl-envvars.js [new file with mode: 0644]