-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: document argument variant in the repl.md #10221
Conversation
@@ -411,6 +411,8 @@ added: v0.1.91 | |||
`SIGINT` is received, i.e. `Ctrl+C` is pressed. This cannot be used together | |||
with a custom `eval` function. Defaults to `false`. | |||
|
|||
If `options` is a string, then it specifies the input prompt. |
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.
Can you elaborate here on what specifying the input prompt means? Perhaps with an example?
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've tried to mirror others argument variant notes, for example in fs.md
:
https://github.com/nodejs/node/blame/master/doc/api/fs.md#L473
https://github.com/nodejs/node/blame/master/doc/api/fs.md#L629
https://github.com/nodejs/node/blame/master/doc/api/fs.md#L676
https://github.com/nodejs/node/blame/master/doc/api/fs.md#L1364
https://github.com/nodejs/node/blame/master/doc/api/fs.md#L1916
Would a more verbose note be a duplicate of this explanation above?
Maybe, you could suggest the explanation? As for example, I could add some.
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.
@benjamingr I've added an example. Is it OK? If the elaboration is still needed, could you suggest one? I am not very good at English.
`options` in the `repl.start([options])` can be a string.
Yes, LGTM |
/cc @nodejs/documentation |
Landed in 50cb3a3 |
`options` in the `repl.start([options])` can be a string. Ref: #10160 PR-URL: #10221 Reviewed-By: Benjamin Gruenbaum <[email protected]>
`options` in the `repl.start([options])` can be a string. Ref: #10160 PR-URL: #10221 Reviewed-By: Benjamin Gruenbaum <[email protected]>
`options` in the `repl.start([options])` can be a string. Ref: nodejs#10160 PR-URL: nodejs#10221 Reviewed-By: Benjamin Gruenbaum <[email protected]>
`options` in the `repl.start([options])` can be a string. Ref: nodejs#10160 PR-URL: nodejs#10221 Reviewed-By: Benjamin Gruenbaum <[email protected]>
`options` in the `repl.start([options])` can be a string. Ref: #10160 PR-URL: #10221 Reviewed-By: Benjamin Gruenbaum <[email protected]>
`options` in the `repl.start([options])` can be a string. Ref: #10160 PR-URL: #10221 Reviewed-By: Benjamin Gruenbaum <[email protected]>
Checklist
Affected core subsystem(s)
doc, repl
Description of change
Document that
options
in therepl.start([options])
can be a string.This commit is separated from #10160 on demand for more careful evaluation.
Please, consider these facts:
String argument is already used in the doc examples here and here.
It is also used in the
repl.js
comment example.The chain from string argument to prompt and other options setting is this:
exports.start
->REPLServer
->Interface
in thereadline.js