-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: general improvements to repl.md copy #7002
Conversation
* `.exit` - Close the I/O stream, causing the REPL to exit. | ||
* `.help` - Show this list of special commands. | ||
* `.save` - Save the current REPL session to a file: | ||
`>.save ./file/to/save.js` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it’s only copied, but there should be a space between >
and .save
, right?
LGTM with a couple of comments |
and output may be from `stdin` and `stdout`, respectively, or may be connected | ||
to any Node.js [stream][]. | ||
|
||
Instances of `repl.REPLServer` support persistent history of prior inputs, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think only the built-in REPL supports persistent history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is true, it was discussed and decided against for increasing the API surface a few months ago.
The repl documentation has always been rather lacking. This is a first step towards making significant improvements.
Nits addressed! PTAL! |
@addaleax .. ping |
... }; | ||
[Function] | ||
``` | ||
var r = repl.start({prompt: '>', eval: myEval, writer: myWriter}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: const?
Still LGTM :) |
Thank you @addaleax ! Updated to fix those nits. Will get this landed. |
The repl documentation has always been rather lacking. This is a first step towards making significant improvements. PR-URL: #7002 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Landed in c339c58 |
The repl documentation has always been rather lacking. This is a first step towards making significant improvements. PR-URL: #7002 Reviewed-By: Anna Henningsen <anna@addaleax.net>
Checklist
Affected core subsystem(s)
doc (repl)
Description of change
The repl documentation has always been rather lacking. This is a first step towards making significant improvements.
Refs: #3674
@nodejs/documentation