readline: add reverse search
Hello Team,
I wanted to add reverse search to repl:
- Reverse search is supported in linux and unix terminals.
- User can press
ctrl+r
to search their history - When user types in text, we search through
node_repl_history
and show off the matching results. - When user press enter we run the matching command on our
repl
. - When more results found for a string, pressing
ctrl+r
again will navigate the search results one by one in a circular fashion (if we reach end of the search result).
It's a work in progress need tests, doc etc.
Initial mode of working is ready.
Need thoughts from community on the idea. But I would love to land this on repl
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines