Skip to content

Commit dbf6486

Browse files
Trottdanielleadams
authored andcommitted
doc: simplify readline/stdin text
PR-URL: #41583 Reviewed-By: Mestery <[email protected]> Reviewed-By: Anna Henningsen <[email protected]>
1 parent 20ac943 commit dbf6486

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
@@ -671,15 +671,8 @@ a `'resize'` event on the `output` if or when the columns ever change
671671
([`process.stdout`][] does this automatically when it is a TTY).
672672

673673
When creating a `readline.Interface` using `stdin` as input, the program
674-
will not terminate until it receives `EOF` (<kbd>Ctrl</kbd>+<kbd>D</kbd> on
675-
Linux/macOS, <kbd>Ctrl</kbd>+<kbd>Z</kbd> followed by <kbd>Return</kbd> on
676-
Windows).
677-
If you want your application to exit without waiting for user input, you can
678-
[`unref()`][] the standard input stream:
679-
680-
```js
681-
process.stdin.unref();
682-
```
674+
will not terminate until it receives an [EOF character][]. To exit without
675+
waiting for user input, call `process.stdin.unref()`.
683676

684677
### Use of the `completer` function
685678

@@ -1007,6 +1000,7 @@ const { createInterface } = require('readline');
10071000
</tr>
10081001
</table>
10091002

1003+
[EOF character]: https://en.wikipedia.org/wiki/End-of-file#EOF_character
10101004
[Readable]: stream.md#readable-streams
10111005
[TTY]: tty.md
10121006
[TTY keybindings]: #tty-keybindings
@@ -1018,5 +1012,4 @@ const { createInterface } = require('readline');
10181012
[`process.stdin`]: process.md#processstdin
10191013
[`process.stdout`]: process.md#processstdout
10201014
[`rl.close()`]: #rlclose
1021-
[`unref()`]: net.md#socketunref
10221015
[reading files]: #example-read-file-stream-line-by-line

0 commit comments

Comments
 (0)