From f2a42df2f33c99a47e0c04d1bc17662f2319b8b1 Mon Sep 17 00:00:00 2001 From: Marshall Lochbaum Date: Mon, 12 Apr 2021 13:33:32 -0400 Subject: =?UTF-8?q?Add=20=E2=80=A2Show=20to=20REPLs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/bqn.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'docs/bqn.js') diff --git a/docs/bqn.js b/docs/bqn.js index 896a39a5..891248f2 100755 --- a/docs/bqn.js +++ b/docs/bqn.js @@ -358,7 +358,9 @@ if (typeof module!=='undefined') { let args = process.argv.slice(2); args.map(a=>{ try { - console.log(fmt(bqn(a))) + let out=[]; sysvals.show = (x,w) => { out.push(x); return x; } + out.push(bqn(a)); + console.log(out.map(fmt).join('\n')); } catch(e) { console.error(''+fmtErr(Array.from(a),e)+''); } -- cgit v1.2.3