Uh oh!
There was an error while loading. Please reload this page.
repl: Add editor mode support - #7275
Conversation
I think this change needs to be voted on or at least discussed first - but personally I'm in favor - thanks for the contribution! |
Trott
commented
Jun 12, 2016
Can you add a test for paste mode? Existing |
a3a13dd to
0543975Compareprincejwesley
commented
Jun 12, 2016
@Trott Done! |
Trott
commented
Jun 13, 2016
/cc @Fishrock123 |
There was a problem hiding this comment.
This code looks strange because of the indentation. Maybe change it to string concatenations.
0543975 to
542e270CompareTrott
commented
Jun 14, 2016
The doc could probably use some information about what paste mode is. |
Trott
commented
Jun 14, 2016
Based on |
Fishrock123
commented
Jun 15, 2016
Keep in mind that more of us have touched the internal module. I probably won't get to taking a look soon, but I'll leave my assignee as a self reminder for now. |
There was a problem hiding this comment.
This should probably line up with e instanceof Recoverable…
542e270 to
b837360CompareThere was a problem hiding this comment.
better as a .prototype method?
Fishrock123
commented
Jun 17, 2016
Could someone elaborate on the benefits of this vs just normally pasting? Is it because you can edit the paste? |
Fishrock123
commented
Jun 17, 2016
|
b837360 to
0d1ef06CompareFishrock123
commented
Jun 17, 2016
@princejwesley Shouldn't tab completion still work? Sounds like I should give this a try. I'm not so sure |
princejwesley
commented
Jun 17, 2016
@Fishrock123 Yes. |
0d1ef06 to
482a4feCompareprincejwesley
commented
Aug 1, 2016
princejwesley
commented
Aug 2, 2016
CI is green |
trevnorris
commented
Aug 2, 2016
@princejwesley To confirm, there's nothing here that checks for tab press anymore (i.e. would conflict with #7754)? |
princejwesley
commented
Aug 2, 2016
@trevnorris Good point. I'll pull the patch and test locally. |
princejwesley
commented
Aug 2, 2016
```js
> node
> .editor
// Entering editor mode (^D to finish, ^C to cancel)
function test() {
console.log('tested!');
}
test();
// ^D
tested!
undefined
>
```caf100a to
370616cCompareprincejwesley
commented
Aug 3, 2016
princejwesley
commented
Aug 6, 2016
Irrelevant CI failures: #3520, #3626, #3550@Fishrock123 |
jasnell
commented
Aug 6, 2016
New run to see if we can get all green... https://ci.nodejs.org/job/node-test-pull-request/3551/ |
princejwesley
commented
Aug 6, 2016
@jasnell CI is green |
jasnell
commented
Aug 6, 2016
Woo! 😀 LGTM, let's land it |
```js
> node
> .editor
// Entering editor mode (^D to finish, ^C to cancel)
function test() {
console.log('tested!');
}
test();
// ^D
tested!
undefined
>
```
PR-URL: #7275
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>princejwesley
commented
Aug 6, 2016
Landed in b779eb42 |
```js
> node
> .editor
// Entering editor mode (^D to finish, ^C to cancel)
function test() {
console.log('tested!');
}
test();
// ^D
tested!
undefined
>
```
PR-URL: #7275
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Evan Lucas <evanlucas@me.com>Notable changes: * build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) #7983 and #7576 * child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) #7811 and #7838 * fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) #7942 * repl: The REPL now supports editor mode. (Prince J Wesley) #7275 * util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) #8013 Refs: #8020 PR-URL: #8070
Notable changes: * build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) #7983 and #7576 * child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) #7811 and #7838 * child_process: argv[0] can now be set to arbitrary values in spawned processes. (Pat Pannuto) #7696 * fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) #7942 * repl: The REPL now supports editor mode. (Prince J Wesley) #7275 * util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) #8013 Refs: #8020 PR-URL: #8070
Notable changes: * build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) #7983 and #7576 * child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) #7811 and #7838 * child_process: argv[0] can now be set to arbitrary values in spawned processes. (Pat Pannuto) #7696 * fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) #7942 * repl: The REPL now supports editor mode. (Prince J Wesley) #7275 * util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) #8013 Refs: #8020 PR-URL: #8070
Notable changes: * build: zlib symbols and additional OpenSSL symbols are now exposed on Windows platforms. (Alex Hultman) nodejs#7983 and nodejs#7576 * child_process, cluster: Forked child processes and cluster workers now support stdio configuration. (Colin Ihrig) nodejs#7811 and nodejs#7838 * child_process: argv[0] can now be set to arbitrary values in spawned processes. (Pat Pannuto) nodejs#7696 * fs: fs.ReadStream now exposes the number of bytes it has read so far. (Linus Unnebäck) nodejs#7942 * repl: The REPL now supports editor mode. (Prince J Wesley) nodejs#7275 * util: inspect() can now be configured globally using util.inspect.defaultOptions. (Roman Reiss) nodejs#8013 Refs: nodejs#8020 PR-URL: nodejs#8070
nbering
commented
Aug 16, 2016
Sorry, a bit late to the issue because I just found it in the release notes. As I understand it this feature is strictly about delaying the execution of the command until you're done entering all the lines? I was hoping when I saw the feature name that it would allow me to fix previous lines if I make an error, but it seems once I hit enter that I can't go back. |
PeterAronZentai
commented
Aug 26, 2016
Yeah, that was my first impression too, maybe because it is called .editor. Probably .paste would create less confusion. |
Checklist
make -j4 test(UNIX) orvcbuild test nosign(Windows) passesAffected core subsystem(s)
repl, doc
Description of change
Enabling
pasteeditor mode support for REPL (inspired byscalaREPL).