node/lib
Danny Nemer 5bda5faffd readline: add option to stop duplicates in history
Adds `options.deDupeHistory` for `readline.createInterface(options)`. If
`options.deDupeHistory` is `true`, when a new input line being added to
the history list duplicates an older one, removes the older line from
the list. Defaults to `false`.

Many users would appreciate this option, as it is a common setting in
shells. This option certainly should not be default behavior, as it
would be problematic in applications such as the `repl`, which inherits
from the readline `Interface`.

Extends documentation to reflect this API addition.

Adds tests for when `options.deDupeHistory` is truthy, and when
`options.deDupeHistory` is falsey.

PR-URL: https://github.com/nodejs/node/pull/2982
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
2017-03-17 17:01:32 -04:00
..
internal lib: avoid using forEach 2017-03-17 11:09:55 -07:00
.eslintrc.yaml tools: rename eslintrc to an undeprecated format 2017-01-18 09:48:52 +05:30
_debug_agent.js lib: remove unused msg parameter in debug_agent 2017-03-15 17:03:02 +01:00
_debugger.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_http_agent.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_http_client.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_http_common.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_http_incoming.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_http_outgoing.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_http_server.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_linklist.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_stream_duplex.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_stream_passthrough.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_stream_readable.js stream: avoid using forEach 2017-03-17 11:09:10 -07:00
_stream_transform.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_stream_wrap.js stream: avoid using forEach 2017-03-17 11:09:10 -07:00
_stream_writable.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_tls_common.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_tls_legacy.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
_tls_wrap.js tls: avoid using forEach 2017-03-17 11:09:16 -07:00
assert.js assert: enforce type check in deepStrictEqual 2017-03-12 17:07:13 +01:00
buffer.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
child_process.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
cluster.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
console.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
constants.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
crypto.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
dgram.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
dns.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
domain.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
events.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
fs.js fs: avoid using forEach 2017-03-17 11:09:20 -07:00
http.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
https.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
module.js module: avoid using forEach 2017-03-17 11:09:45 -07:00
net.js net: avoid using forEach 2017-03-17 11:09:30 -07:00
os.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
path.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
process.js src: remove excessive license boilerplate 2015-01-27 16:35:05 +11:00
punycode.js lib: remove let from for loops 2016-10-04 12:17:32 -04:00
querystring.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
readline.js readline: add option to stop duplicates in history 2017-03-17 17:01:32 -04:00
repl.js repl: avoid using forEach 2017-03-17 11:09:40 -07:00
stream.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
string_decoder.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
sys.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
timers.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
tls.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
tty.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
url.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
util.js util: avoid using forEach 2017-03-17 11:09:50 -07:00
v8.js v8: add cachedDataVersionTag 2017-03-05 14:23:02 +01:00
vm.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
zlib.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00