From 97737fd5fb4a6b36c2e65905b8cf3518499a8a5e Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Fri, 8 Mar 2019 12:21:35 +0100 Subject: [PATCH] repl: fix terminal default setting This makes sure that the described default behavior for the `terminal` option is actually always used and not only when running the REPL as standalone program. The options code is now logically combined instead of being spread out in the big REPL constructor. PR-URL: https://github.com/nodejs/node/pull/26518 Reviewed-By: Lance Ball Reviewed-By: Matteo Collina Reviewed-By: Rich Trott Reviewed-By: James M Snell --- doc/api/cli.md | 2 +- doc/api/repl.md | 11 +++- lib/internal/repl.js | 20 +++--- lib/internal/tty.js | 3 + lib/repl.js | 97 +++++++++++++++--------------- test/parallel/test-repl-colors.js | 3 + test/parallel/test-repl-envvars.js | 8 ++- 7 files changed, 80 insertions(+), 64 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index cf28d9b2bf9e64..75804e11521aee 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -671,7 +671,7 @@ added: v0.1.32 added: v0.3.0 --> -When set to `1` colors will not be used in the REPL. +When set, colors will not be used in the REPL. ### `NODE_EXTRA_CA_CERTS=file`