[RFC]: add support for whole command insertion when pressing up/down in the REPL #2070
Closed
3 tasks done
Labels
difficulty: 3
Likely to be challenging but manageable.
Enhancement
Issue or pull request for enhancing existing functionality.
JavaScript
Issue involves or relates to JavaScript.
Needs Discussion
Needs further discussion.
priority: Normal
Normal priority concern or feature request.
REPL
Issue or pull request specific to the project REPL.
RFC
Request for comments. Feature requests and proposed changes.
Description
This RFC proposes changing the default behavior in the REPL such that, when hitting the up/down arrow, an entire command is inserted, rather than just a line.
Currently, if you enter multi-line input
and hit the up arrow, you get
This may be useful, but it is likely not what you want. Instead, you'd probably prefer to cycle through the entire command. In which case, when we press the UP arrow, we'd like to re-enter multi-line mode with the entirety of the previous command.
Note that currently we rely on built-in readline/REPL history behavior. In order to support this feature, we may need to maintain our own history record and capture key presses in order to efficiently cycle through entire previous commands.
Related Issues
Questions
Other
No.
Checklist
RFC:
.The text was updated successfully, but these errors were encountered: