@@ -29,23 +29,38 @@ For example, you could add this to your bashrc file:
2929
3030 alias iojs="env NODE_NO_READLINE=1 rlwrap iojs"
3131
32+ ### Persistent History
33+
34+ By default, the REPL will persist history between ` iojs ` REPL sessions by saving
35+ to a ` .node_repl_history ` file in the user's home directory. This can be
36+ disabled by setting the environment variable ` NODE_REPL_HISTORY="" ` .
37+
38+ Previously in io.js v2.x, REPL history was controlled by using a
39+ ` NODE_REPL_HISTORY_FILE ` environment variable, and the history was saved in JSON
40+ format. This variable has now been deprecated, and your REPL history will
41+ automatically be converted to using plain text. The new file will be saved to
42+ either your home directory, or a directory defined by the ` NODE_REPL_HISTORY `
43+ variable, as documented below.
44+
45+ ### Environment Variable Options
46+
3247The built-in repl (invoked by running ` iojs ` or ` iojs -i ` ) may be controlled
3348via the following environment variables:
3449
35- - ` NODE_REPL_HISTORY_FILE ` - if given, must be a path to a user-writable,
36- user-readable file. When a valid path is given, persistent history support
37- is enabled: REPL history will persist across ` iojs ` repl sessions.
38- - ` NODE_REPL_HISTORY_SIZE ` - defaults to ` 1000 ` . In conjunction with
39- ` NODE_REPL_HISTORY_FILE ` , controls how many lines of history will be
40- persisted. Must be a positive number.
50+ - ` NODE_REPL_HISTORY ` - When a valid path is given, persistent REPL history
51+ will be saved to the specified file rather than ` .node_repl_history ` in the
52+ user's home directory. Setting this value to ` "" ` will disable persistent
53+ REPL history.
54+ - ` NODE_REPL_HISTORY_SIZE ` - defaults to ` 1000 ` . Controls how many lines of
55+ history will be persisted if history is available . Must be a positive number.
4156 - ` NODE_REPL_MODE ` - may be any of ` sloppy ` , ` strict ` , or ` magic ` . Defaults
4257 to ` magic ` , which will automatically run "strict mode only" statements in
4358 strict mode.
4459
4560## repl.start(options)
4661
47- Returns and starts a ` REPLServer ` instance, that inherits from
48- [ Readline Interface] [ ] . Accepts an "options" Object that takes
62+ Returns and starts a ` REPLServer ` instance, that inherits from
63+ [ Readline Interface] [ ] . Accepts an "options" Object that takes
4964the following values:
5065
5166 - ` prompt ` - the prompt and ` stream ` for all I/O. Defaults to ` > ` .
0 commit comments