0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/lib
Ruben Bridgewater 9e4349e797
repl: implement reverse search
Add a reverse search that works similar to the ZSH one. It is
triggered with <ctrl> + r and <ctrl> + s. It skips duplicated history
entries and works with multiline statements. Matching entries indicate
the search parameter with an underscore and cancelling with <ctrl> + c
or escape brings back the original line.
Multiple matches in a single history entry work as well and are
matched in the order of the current search direction. The cursor is
positioned at the current match position of the history entry.
Changing the direction immediately checks for the next entry in the
expected direction from the current position on.
Entries are accepted as soon any button is pressed that doesn't
correspond with the reverse search.
The behavior is deactivated for simple terminals. They do not support
most ANSI escape codes that are necessary for this feature.

PR-URL: https://github.com/nodejs/node/pull/31006
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-12-25 11:16:38 +01:00
..
internal repl: implement reverse search 2019-12-25 11:16:38 +01:00
_http_agent.js http: use for...of in http library code 2019-12-17 10:18:00 -08:00
_http_client.js http: use for...of in http library code 2019-12-17 10:18:00 -08:00
_http_common.js http: llhttp opt-in insecure HTTP header parsing 2019-12-09 09:56:16 -08:00
_http_incoming.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
_http_outgoing.js http: use for...of in http library code 2019-12-17 10:18:00 -08:00
_http_server.js http: use for...of in http library code 2019-12-17 10:18:00 -08:00
_stream_duplex.js stream: use for...of 2019-12-16 18:18:50 -05:00
_stream_passthrough.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
_stream_readable.js stream: pipe should not swallow error 2019-12-20 01:38:35 +01:00
_stream_transform.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
_stream_wrap.js lib: assign missed deprecation code 2019-03-07 15:48:55 +01:00
_stream_writable.js lib: replace Symbol.hasInstance by SymbolHasInstance 2019-12-16 09:47:30 +01:00
_tls_common.js tls: for...of in _tls_common.js 2019-12-17 08:11:13 -05:00
_tls_wrap.js tls: for...of in _tls_common.js 2019-12-17 08:11:13 -05:00
.eslintrc.yaml lib: enforce use of Promise from primordials 2019-12-16 08:40:14 +01:00
assert.js assert: use for...of 2019-12-17 17:33:12 -08:00
async_hooks.js async_hooks: ensure proper handling in runInAsyncScope 2019-12-16 21:59:50 -08:00
buffer.js buffer: improve .from() error details 2019-12-20 03:10:12 +01:00
child_process.js lib: enforce use of Promise from primordials 2019-12-16 08:40:14 +01:00
cluster.js
console.js
constants.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
crypto.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
dgram.js dgram: use for...of 2019-12-20 07:35:39 -08:00
dns.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
domain.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
events.js events: add EventEmitter.on to async iterate over events 2019-12-23 09:29:01 +01:00
fs.js lib: enforce use of Promise from primordials 2019-12-16 08:40:14 +01:00
http2.js
http.js lib: flatten access to primordials 2019-11-25 10:28:15 +01:00
https.js http,https: increase server headers timeout 2019-12-14 08:59:19 -05:00
inspector.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
module.js lib: rework logic of stripping BOM+Shebang from commonjs 2019-05-26 13:04:29 -05:00
net.js net: remove duplicate _undestroy 2019-12-11 05:58:42 +01:00
os.js lib: replace Symbol.toPrimitive to SymbolToPrimitive primordials 2019-12-13 20:05:49 -05:00
path.js path: replace var with let in lib/path.js 2019-11-09 08:44:29 -08:00
perf_hooks.js perf_hooks: remove unnecessary bind 2019-12-14 09:01:44 -05:00
process.js
punycode.js lib: use strict equality comparison 2019-12-14 08:57:36 -05:00
querystring.js lib: enforce use of Array from primordials 2019-11-27 19:29:01 +01:00
readline.js readline: promote _getCursorPos to public api 2019-12-16 11:22:25 +01:00
repl.js repl: implement reverse search 2019-12-25 11:16:38 +01:00
stream.js stream: simplify uint8ArrayToBuffer helper 2019-10-22 13:37:59 -05:00
string_decoder.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
sys.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
timers.js lib: enforce use of Promise from primordials 2019-12-16 08:40:14 +01:00
tls.js tls: allow empty subject even with altNames defined 2019-11-29 02:13:41 +01:00
trace_events.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
tty.js lib: use static Number properties from primordials 2019-11-30 13:45:38 +01:00
url.js url: declare iterator inside loop 2019-12-11 16:38:06 -06:00
util.js lib: use static Number properties from primordials 2019-11-30 13:45:38 +01:00
v8.js v8: use of TypedArray constructors from primordials 2019-12-16 08:33:41 +01:00
vm.js doc,vm,test: remove _sandbox_ from vm documentation 2019-12-24 16:14:05 -08:00
wasi.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00
worker_threads.js worker: allow specifying resource limits 2019-11-05 19:57:13 +01:00
zlib.js lib: replace Symbol global by the primordials Symbol 2019-12-08 13:38:58 +01:00