Skip to content
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 readline.md copy #7022

Closed
wants to merge 2 commits into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented May 27, 2016

Checklist
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

doc (readline)

Description of change

General improvements to readline.md copy

@nodejs/documentation

@jasnell jasnell added doc Issues and PRs related to the documentations. readline Issues and PRs related to the built-in readline module. labels May 27, 2016
If `output` is set to `null` or `undefined` when calling `createInterface`,
nothing is displayed.
*Note* Once this code is invoked, the Node.js application will not
terminate until the `readline` interface is closed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might want to explain here that this is because the interface waits for data from the input stream? Feel free to omit if you think that would go too much into detail.

@addaleax
Copy link
Member

See also: #6996 … Maybe cherry-pick that into this PR as a second commit?

@jasnell
Copy link
Member Author

jasnell commented May 27, 2016

If #6996 lands first I'll rebase this on it. If this lands first, I'll cherry pick it in

@jasnell
Copy link
Member Author

jasnell commented May 27, 2016

Nits fixed!

const readline = require('readline');
const rl = readline.createInterface(process.stdin, process.stdout);

rl.setPrompt('OHAI> ');
Copy link
Contributor

@Fishrock123 Fishrock123 May 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe 'Tiny> '? (No need to change if you'd like to keep the ohai though imo)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meh, I'm good with ohai for the example

@jasnell
Copy link
Member Author

jasnell commented Jun 2, 2016

Nits addressed. @nodejs/documentation ... one final look please :-)

@jasnell
Copy link
Member Author

jasnell commented Jun 6, 2016

ping @nodejs/documentation

@benjamingr
Copy link
Member

LGTM

@jasnell
Copy link
Member Author

jasnell commented Jun 6, 2016

Rebased to resolve conflicts after the added details were added

Clarify that readline's rl.question() callback does not
use the err back pattern.

Fixes: nodejs#4833
jasnell added a commit that referenced this pull request Jun 7, 2016
PR-URL: #7022
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
jasnell added a commit that referenced this pull request Jun 7, 2016
Clarify that readline's rl.question() callback does not
use the err back pattern.

Fixes: #4833
PR-URL: #7022
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
@jasnell
Copy link
Member Author

jasnell commented Jun 7, 2016

Landed in ed8b600 and c300ba2

@jasnell jasnell closed this Jun 7, 2016
evanlucas pushed a commit that referenced this pull request Jun 15, 2016
PR-URL: #7022
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
evanlucas pushed a commit that referenced this pull request Jun 15, 2016
Clarify that readline's rl.question() callback does not
use the err back pattern.

Fixes: #4833
PR-URL: #7022
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
@evanlucas evanlucas mentioned this pull request Jun 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. readline Issues and PRs related to the built-in readline module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants