From: isaacs Date: Mon, 27 Feb 2012 19:09:34 +0000 (-0800) Subject: doc refactor: repl X-Git-Tag: v0.7.6~85^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dfdf09d43d06afae9083ddb3a04b9114956f5cde;p=platform%2Fupstream%2Fnodejs.git doc refactor: repl --- diff --git a/doc/api/repl.markdown b/doc/api/repl.markdown index a55835a..bb40a34 100644 --- a/doc/api/repl.markdown +++ b/doc/api/repl.markdown @@ -1,4 +1,4 @@ -## REPL +# REPL A Read-Eval-Print-Loop (REPL) is available both as a standalone program and easily includable in other programs. REPL provides a way to interactively run @@ -27,7 +27,7 @@ For example, you could add this to your bashrc file: alias node="env NODE_NO_READLINE=1 rlwrap node" -### repl.start([prompt], [stream], [eval], [useGlobal], [ignoreUndefined]) +## repl.start([prompt], [stream], [eval], [useGlobal], [ignoreUndefined]) Starts a REPL with `prompt` as the prompt and `stream` for all I/O. `prompt` is optional and defaults to `> `. `stream` is optional and defaults to @@ -77,7 +77,9 @@ By starting a REPL from a Unix socket-based server instead of stdin, you can connect to a long-running node process without restarting it. -### REPL Features +## REPL Features + + Inside the REPL, Control+D will exit. Multi-line expressions can be input. Tab completion is supported for both global and local variables.