From 7ec9861f291fdc3e2661f00e006e3babf1d5a357 Mon Sep 17 00:00:00 2001 From: Jakub Jankiewicz Date: Fri, 8 Nov 2024 15:03:25 +0100 Subject: [PATCH] show proper version on Node REPL --- bin/lips.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/bin/lips.js b/bin/lips.js index 75f9d740..4774c230 100755 --- a/bin/lips.js +++ b/bin/lips.js @@ -30,11 +30,10 @@ import { nil, Pair, env, - banner, InputPort, OutputPort } from '../src/lips.js'; -import { version, date } from '../dist/lips.esm.js'; +import { version, date, banner } from '../dist/lips.esm.js'; import fs from 'fs'; import os from 'os'; @@ -404,7 +403,7 @@ if (options.version || options.V) { } } else if (options.h || options.help) { var name = process.argv[1]; - var intro = banner.replace(/(Jankiewicz\n)[\s\S]+$/, '$1').replace('{{VER}}', version); + var intro = banner.replace(/(Jankiewicz\n)[\s\S]+$/, '$1'); console.log(format('%s\nusage:\n %s -q | -c | -h | -t | -b | -d | -e | \n' + '\n [-h --help]\t\tthis help message\n [-e --eval]\t\texecute code\n [-V --v' + 'ersion]\tdisplay version information according to srfi-176\n [-c --compile]\t' + @@ -420,7 +419,7 @@ if (options.version || options.V) { const dynamic = options.d || options.dynamic; const entry = ' ' + (dynamic ? 'dynamic' : 'lexical') + ' scope $1'; if (process.stdin.isTTY && !quiet) { - console.log(banner.replace(/(\n\nLIPS.+)/m, entry)); // ' + console.log(banner.replace(/(\n\nLIPS.+)/m, entry)); } var prompt = 'lips> '; var continue_prompt = '... ';