Skip to content

Commit 763c7e8

Browse files
TrottLinkgoron
authored andcommitted
doc: simplify readline/stdin text
PR-URL: nodejs#41583 Reviewed-By: Mestery <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent d09bc56 commit 763c7e8

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

doc/api/readline.md

+3-10
Original file line numberDiff line numberDiff line change
@@ -1059,15 +1059,8 @@ a `'resize'` event on the `output` if or when the columns ever change
10591059
([`process.stdout`][] does this automatically when it is a TTY).
10601060

10611061
When creating a `readline.Interface` using `stdin` as input, the program
1062-
will not terminate until it receives `EOF` (<kbd>Ctrl</kbd>+<kbd>D</kbd> on
1063-
Linux/macOS, <kbd>Ctrl</kbd>+<kbd>Z</kbd> followed by <kbd>Return</kbd> on
1064-
Windows).
1065-
If you want your application to exit without waiting for user input, you can
1066-
[`unref()`][] the standard input stream:
1067-
1068-
```js
1069-
process.stdin.unref();
1070-
```
1062+
will not terminate until it receives an [EOF character][]. To exit without
1063+
waiting for user input, call `process.stdin.unref()`.
10711064

10721065
#### Use of the `completer` function
10731066

@@ -1411,6 +1404,7 @@ const { createInterface } = require('readline');
14111404
</tr>
14121405
</table>
14131406

1407+
[EOF character]: https://en.wikipedia.org/wiki/End-of-file#EOF_character
14141408
[Readable]: stream.md#readable-streams
14151409
[TTY]: tty.md
14161410
[TTY keybindings]: #tty-keybindings
@@ -1422,5 +1416,4 @@ const { createInterface } = require('readline');
14221416
[`process.stdin`]: process.md#processstdin
14231417
[`process.stdout`]: process.md#processstdout
14241418
[`rl.close()`]: #rlclose
1425-
[`unref()`]: net.md#socketunref
14261419
[reading files]: #example-read-file-stream-line-by-line

0 commit comments

Comments
 (0)