Repository navigation
FR: CodeBlocks in REPL. #20817
Description
Activity
- addedreplIssues and PRs related to the REPL subsystem.Issues and PRs related to the REPL subsystem.feature requestIssues requesting new Node.js features.Issues requesting new Node.js features.
on May 18, 2018 I'm fairly sure this has been discussed before but I can't find the issue.
The problem with your suggestion is that you won't be able to edit code blocks anymore since the REPL is line-oriented. It's not a text editor where you can move up and down. (Not counting
ed.)@bnoordhuis can't we trim the newlines from the code block to make sure that the block shows up on a single line? That's what the mongoDB REPL does, and is quite convenient.
Shells like bash or zsh can do that:
https://asciinema.org/a/lBGxcTTxXoGGhPmhARMAt0CsG
Is it an option for Node?
Reacted by antsmartian@AyushG3112 I don't think so. ASI means JS code with and without newlines doesn't necessarily behave the same.
Agree that we won't be able to edit it, but it would make this easier to tracking what was done, maybe we need to copy the block or we are demoing something on REPL...
This got fixed : #22153 and landed in master. Was surprised, I didn't notice this issue before (I saw the problem myself and fixed it :)). We can close this now.
@antsmartian Awesome! We can try this on nightly, I guess.
So, today:
Rather, if we could display the entire code block, when we do an up arrow, like:
This should make life on the REPL much easier.
Very similar to how devtool console treats code blocks.