Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNathan Rajlich <nathan@tootallnate.net>2012-03-27 23:41:42 +0400
committerNathan Rajlich <nathan@tootallnate.net>2012-03-28 00:54:49 +0400
commitf41901cdf6e6236de3f588051b81340e9c1dd61f (patch)
tree7d08cf01f39a33aa94285ad536e69dfa7bb1953f /doc
parent00224771e32e4d051e5ea33b7e854f0031359912 (diff)
repl: make ^D emit an 'end' event on the readline instance
Also emit 'exit' on the repl when 'end' is emitted on the readline. Fixes `node debug test/fixtures/breakpoints.js` when ^D is pressed.
Diffstat (limited to 'doc')
-rw-r--r--doc/api/readline.markdown8
-rw-r--r--doc/api/repl.markdown3
2 files changed, 10 insertions, 1 deletions
diff --git a/doc/api/readline.markdown b/doc/api/readline.markdown
index e707a271fa3..7c9c00c1cf8 100644
--- a/doc/api/readline.markdown
+++ b/doc/api/readline.markdown
@@ -160,6 +160,14 @@ Example of listening for `resume`:
console.log('Readline resumed.');
});
+### Event: 'end'
+
+`function () {}`
+
+Emitted when the `input` stream receives its "end" event, or when `^D` is
+pressed by the user. It's generally a good idea to consider this `Interface`
+instance as completed after this is emitted.
+
### Event: 'SIGINT'
`function () {}`
diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown
index c61c5751b73..622abdf8e3e 100644
--- a/doc/api/repl.markdown
+++ b/doc/api/repl.markdown
@@ -116,7 +116,8 @@ see: https://gist.github.com/2053342
`function () {}`
Emitted when the user exits the REPL in any of the defined ways. Namely, typing
-`.exit` at the repl, or pressing Ctrl+C twice to signal SIGINT.
+`.exit` at the repl, pressing Ctrl+C twice to signal SIGINT, or pressing Ctrl+D
+to signal "end" on the `input` stream.
Example of listening for `exit`: