From 0394de3755ad6944b63364a9f656b6e363964e1a Mon Sep 17 00:00:00 2001 From: Yorick van Pelt Date: Mon, 30 Jan 2023 14:45:45 +0100 Subject: [PATCH] Add repl subcommand --- index.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.ts b/index.ts index 2482ad7..7d48e50 100644 --- a/index.ts +++ b/index.ts @@ -10,6 +10,7 @@ import { DateTime } from "luxon" import fs from "node:fs" import { jsonOut, csvOut, sum, runCommands, getXdgConfigHome } from "./util.js" import path from "node:path" +import repl from "node:repl" type QuantityDecorator = { type: "QUANTITY" @@ -133,6 +134,9 @@ const commands = (argv: ParsedArgs) => { } } }, + repl() { + repl.start().context.p = p + } } }