Skip to content

readline: add reverse search

Hello Team,

I wanted to add reverse search to repl:

  1. Reverse search is supported in linux and unix terminals.
  2. User can press ctrl+r to search their history
  3. When user types in text, we search through node_repl_history and show off the matching results.
  4. When user press enter we run the matching command on our repl.
  5. 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.

repl-search

Need thoughts from community on the idea. But I would love to land this on repl 😍

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading