Add repl subcommand

main
Yorick van Pelt 2023-01-30 14:45:45 +01:00
parent 1bfdb788ed
commit 0394de3755
Signed by: yorick
GPG Key ID: A36E70F9DC014A15
1 changed files with 4 additions and 0 deletions

View File

@ -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
}
}
}