Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC]: add reverse-search support in the REPL #2069

Open
3 tasks done
kgryte opened this issue Mar 27, 2024 · 1 comment
Open
3 tasks done

[RFC]: add reverse-search support in the REPL #2069

kgryte opened this issue Mar 27, 2024 · 1 comment
Labels
difficulty: 4 Likely to be moderately difficult. Enhancement Issue or pull request for enhancing existing functionality. JavaScript Issue involves or relates to JavaScript. Needs Discussion Needs further discussion. priority: Normal Normal priority concern or feature request. REPL Issue or pull request specific to the project REPL. RFC Request for comments. Feature requests and proposed changes.

Comments

@kgryte
Copy link
Member

kgryte commented Mar 27, 2024

Description

This RFC proposes adding reverse search support in the REPL. The basic idea is to enable entering a search mode in order to more efficiently cycle through previous commands. Currently, in order to run a previous command, one must hit the UP arrow key until finding the command. This RFC proposes enabling a mode where you can filter history to more quickly find a matching command.

This behavior is currently enabled in the built-in Node.js REPL and matches that found in ZSH.

For references better explaining the expected behavior, see below.

Related Issues

Questions

  • How would multi-line commands be handled?

Other

Checklist

  • I have read and understood the Code of Conduct.
  • Searched for existing issues and pull requests.
  • The issue name begins with RFC:.
@kgryte kgryte added Enhancement Issue or pull request for enhancing existing functionality. RFC Request for comments. Feature requests and proposed changes. Needs Discussion Needs further discussion. REPL Issue or pull request specific to the project REPL. priority: Normal Normal priority concern or feature request. JavaScript Issue involves or relates to JavaScript. difficulty: 4 Likely to be moderately difficult. labels Mar 27, 2024
@Rejoan-Sardar
Copy link
Contributor

@kgryte I would like to work on this.

Planeshifter pushed a commit that referenced this issue Jul 16, 2024
PR-URL: #2531
Closes: #2070 
Ref: #2069

---------

Signed-off-by: Snehil Shah <snehilshah.989@gmail.com>
Signed-off-by: Athan Reines <kgryte@gmail.com>
Co-authored-by: Athan Reines <kgryte@gmail.com>
Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com> 
Reviewed-by: Athan Reines <kgryte@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: 4 Likely to be moderately difficult. Enhancement Issue or pull request for enhancing existing functionality. JavaScript Issue involves or relates to JavaScript. Needs Discussion Needs further discussion. priority: Normal Normal priority concern or feature request. REPL Issue or pull request specific to the project REPL. RFC Request for comments. Feature requests and proposed changes.
Projects
None yet
Development

No branches or pull requests

2 participants