[RFC]: add support for bracketed paste in the REPL #2068
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 adding support for bracketed paste in the REPL. Currently, if you were to copy
into the REPL, you'd get
where, if the pasted content contains a newline character, the expressions will be automatically evaluated.
The idea behind bracketed paste is to recognize pasted content so that a user can inspect and potentially edit pasted content before explicitly executing.
Enabling bracketed paste should be a matter of using escape sequences and then checking for a paste start sequence before executing content and then waiting for the paste to stop by checking for the stop sequence.
Once the REPL exits, we should disable bracketed paste.
Additionally, we should add an option which can be set during REPL instantiation (via the REPL constructor) for enabling/disabling bracketed paste, with the default behavior being enabled.
Related Issues
Questions
Other
Checklist
RFC:
.The text was updated successfully, but these errors were encountered: