repl: add reverse search by BridgeAR · Pull Request #31006 · nodejs/node
added
readline
labels
Dec 17, 2019Add 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 searches 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.
BridgeAR
marked this pull request as ready for review
BridgeAR
added
notable-change
labels
Dec 19, 2019
BridgeAR
added
the
author ready
label
Dec 20, 2019BridgeAR added a commit that referenced this pull request
Jan 7, 2020Notable changes:
* assert:
* Implement `assert.match()` and `assert.doesNotMatch()` (Ruben
Bridgewater) #30929
* events:
* Add `EventEmitter.on` to async iterate over events (Matteo Collina)
#27994
* Allow monitoring error events (Gerhard Stoebich)
#30932
* fs:
* Allow overriding `fs` for streams (Robert Nagy)
#29083
* perf_hooks:
* Move `perf_hooks` out of experimental (legendecas)
#31101
* repl:
* Implement ZSH-like reverse-i-search (Ruben Bridgewater)
#31006
* tls:
* Add PSK (pre-shared key) support (Denys Otrishko)
#23188
PR-URL: #31238
BridgeAR added a commit that referenced this pull request
Jan 7, 2020Notable changes:
* assert:
* Implement `assert.match()` and `assert.doesNotMatch()` (Ruben
Bridgewater) #30929
* events:
* Add `EventEmitter.on` to async iterate over events (Matteo Collina)
#27994
* Allow monitoring error events (Gerhard Stoebich)
#30932
* fs:
* Allow overriding `fs` for streams (Robert Nagy)
#29083
* perf_hooks:
* Move `perf_hooks` out of experimental (legendecas)
#31101
* repl:
* Implement ZSH-like reverse-i-search (Ruben Bridgewater)
#31006
* tls:
* Add PSK (pre-shared key) support (Denys Otrishko)
#23188
PR-URL: #31238
BridgeAR added a commit that referenced this pull request
Jan 7, 2020Notable changes:
* assert:
* Implement `assert.match()` and `assert.doesNotMatch()` (Ruben
Bridgewater) #30929
* events:
* Add `EventEmitter.on` to async iterate over events (Matteo Collina)
#27994
* Allow monitoring error events (Gerhard Stoebich)
#30932
* fs:
* Allow overriding `fs` for streams (Robert Nagy)
#29083
* perf_hooks:
* Move `perf_hooks` out of experimental (legendecas)
#31101
* repl:
* Implement ZSH-like reverse-i-search (Ruben Bridgewater)
#31006
* tls:
* Add PSK (pre-shared key) support (Denys Otrishko)
#23188
PR-URL: #31238
BridgeAR
deleted the
2019-12-16-repl-reverse-search
branch
This was referenced
Mar 15, 2020targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This adds support for very long input lines to still display the input preview correct. PR-URL: nodejs#31006 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020Add 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: nodejs#31006 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020This just removes some redundant work and some other small things. PR-URL: nodejs#31006 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit to targos/node that referenced this pull request
Apr 25, 2020The cursor move functions accept a callback. It was possible that `undefined` was returned in case there was no error instead of null. PR-URL: nodejs#31006 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020This adds support for very long input lines to still display the input preview correct. PR-URL: #31006 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020Add 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: #31006 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020This just removes some redundant work and some other small things. PR-URL: #31006 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
targos pushed a commit that referenced this pull request
Apr 28, 2020The cursor move functions accept a callback. It was possible that `undefined` was returned in case there was no error instead of null. PR-URL: #31006 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters