Node REPL, No Preview

After version v12.17.0, Node&rsquo;s REPL provides a useful preview effect. In this example, 2 is shown in gray before I hit enter. > 1 + 1 2 But what if I don&rsquo;t want that? Here&rsquo;s a file called repl that disables it as an option: #!/usr/bin/env node const repl = require ( 'node:repl' ); repl . start ({ preview : false }); Then: $ ./repl > 1 + 1 No preview. Docs