repl: fix persistent history and env variable name
authorRoman Reiss <me@silverwind.io>
Sat, 2 May 2015 21:47:17 +0000 (23:47 +0200)
committerRoman Reiss <me@silverwind.io>
Sat, 2 May 2015 22:41:14 +0000 (00:41 +0200)
commit2e2fce0502399db5d0902a0d3eb9528e1d9420c4
treecc04fd5e08590c951505f3df37a299250014ebe5
parent02388dbf40fcce85e79c5aba8a6c411f523fd17d
repl: fix persistent history and env variable name

Issue #1575 did introduce a check for options.terminal but this variable
wasn't able to get truthy, which in turn broke persistent history
completely. This changes the variable to get truthy on true terminals.

Additionally, the docs and the code did differ on which environment
variable was used for history. This changes the code to use
NODE_REPL_HISTORY_FILE.

PR-URL: https://github.com/iojs/io.js/pull/1593
Reviewed-By: Chris Dickinson <christopher.s.dickinson@gmail.com>
lib/internal/repl.js