Hands the terminal to an editor, and takes back whatever was saved.
A path as a person would say it: qunitx-cli/lib/repl/session.ts for something in this project,
and the absolute path for anything outside it.
Opens a file at a line in the developer's editor, or says why it could not.
.open, .edit and .e — whichever editor the environment prefers.
What .open and every editor-named spelling of it do, differing only in which editor they mean.
Stops the prompt reading, because what happens next is not the prompt's.
A file's contents, or null when it cannot be read — a missing path is an answer, not a crash.
The lines of a session worth replaying: everything typed, minus the shell escapes.
Gives the prompt back its input — unless the session has gone.
How an answer to [Y/n] is read: Enter, or anything starting with y. Everything else is no.
What an edit leaves to run: the buffer where it moved, and nothing where it did not.
True when the file was written. A save that cannot land is a message, not a crashed session.
Usage
import * as mod from "lib/commands/repl/editor.ts";