f
setupHistory(): void
server: REPLServer,
interactive: boolean
Points history at ~/.qunitx_repl_history, honouring QUNITX_REPL_HISTORY (an empty value
turns it off). Only in a terminal — setupHistory is a no-op without one, and a scripted
invocation has no business writing to a history file.
f
trimHistoryFile(): void
file: string,
history: readonly string[]
Cuts the history file back to the history it is meant to hold.
v
HISTORY_KEPT: 1000
How many lines a session keeps. node:repl keeps thirty; a shell keeps thousands.
Usage
import * as mod from "lib/commands/repl/history.ts";