What is the problem this feature will solve?
#57400 changed the node:repl module's "subprompt" from ... to |. This is arguably good for Node's REPL where the main prompt is one character (>), so it encourages alignment, but bad for other software that relied on the subprompt being 3 characters long. See e.g. DanielXMoore/Civet#1768
What is the feature you are proposing to solve the problem?
I suggest that subprompt can be specified in the options object to node:repl, which lets the subprompt be configured. The default remains "| ".
This will require changing the structure of node:readline (where this subprompt is currently stored), though I'm not sure whether we need a public API there.
What alternatives have you considered?
FWIW, #57400 that changed from ... to | mentioned TODO(puskin94): make this configurable (though the comment has since been removed).
I also tried manually overriding require('node:repl').Interface.prototype.setPrompt and require('node:repl').Interface.prototype.prompt, but this did not seem to work; perhaps a different copy of Interface is getting used by node:repl.
What is the problem this feature will solve?
#57400 changed the
node:replmodule's "subprompt" from...to|. This is arguably good for Node's REPL where the main prompt is one character (>), so it encourages alignment, but bad for other software that relied on the subprompt being 3 characters long. See e.g. DanielXMoore/Civet#1768What is the feature you are proposing to solve the problem?
I suggest that
subpromptcan be specified in theoptionsobject tonode:repl, which lets the subprompt be configured. The default remains"| ".This will require changing the structure of
node:readline(where this subprompt is currently stored), though I'm not sure whether we need a public API there.What alternatives have you considered?
FWIW, #57400 that changed from
...to|mentionedTODO(puskin94): make this configurable(though the comment has since been removed).I also tried manually overriding
require('node:repl').Interface.prototype.setPromptandrequire('node:repl').Interface.prototype.prompt, but this did not seem to work; perhaps a different copy ofInterfaceis getting used bynode:repl.