Add repl subcommand
This commit is contained in:
parent
1bfdb788ed
commit
0394de3755
4
index.ts
4
index.ts
|
@ -10,6 +10,7 @@ import { DateTime } from "luxon"
|
||||||
import fs from "node:fs"
|
import fs from "node:fs"
|
||||||
import { jsonOut, csvOut, sum, runCommands, getXdgConfigHome } from "./util.js"
|
import { jsonOut, csvOut, sum, runCommands, getXdgConfigHome } from "./util.js"
|
||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
|
import repl from "node:repl"
|
||||||
|
|
||||||
type QuantityDecorator = {
|
type QuantityDecorator = {
|
||||||
type: "QUANTITY"
|
type: "QUANTITY"
|
||||||
|
@ -133,6 +134,9 @@ const commands = (argv: ParsedArgs) => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
repl() {
|
||||||
|
repl.start().context.p = p
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue