repl: add mode detection, cli persistent history
authorChris Dickinson <christopher.s.dickinson@gmail.com>
Thu, 23 Apr 2015 07:35:53 +0000 (00:35 -0700)
committerChris Dickinson <christopher.s.dickinson@gmail.com>
Fri, 1 May 2015 02:33:05 +0000 (19:33 -0700)
commit0450ce7db22ab4b6f9b2119197389ed7d3eac8c3
tree9f9c8444e4370af50a0fa4216fbfa825a737eb0d
parenta5dcff827a2c7eaec9c20b6271bead8d2225c7c8
repl: add mode detection, cli persistent history

this creates a new internal module responsible for providing
the repl created via "iojs" or "iojs -i," and adds the following
options to the readline and repl subsystems:

* "repl mode" - determine whether a repl is strict mode, sloppy mode,
  or auto-detect mode.
* historySize - determine the maximum number of lines a repl will store
  as history.

The built-in repl gains persistent history support when the
NODE_REPL_HISTORY_FILE environment variable is set. This functionality
is not exposed to userland repl instances.

PR-URL: https://github.com/iojs/io.js/pull/1513
Reviewed-By: Fedor Indutny <fedor@indutny.com>
doc/api/readline.markdown
doc/api/repl.markdown
lib/internal/repl.js [new file with mode: 0644]
lib/module.js
lib/readline.js
lib/repl.js
node.gyp
src/node.js
test/parallel/test-repl-mode.js [new file with mode: 0644]
test/parallel/test-repl-options.js