Skip to content

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

Open

Description

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:.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    EnhancementIssue or pull request for enhancing existing functionality.JavaScriptIssue involves or relates to JavaScript.Needs DiscussionNeeds further discussion.REPLIssue or pull request specific to the project REPL.RFCRequest for comments. Feature requests and proposed changes.difficulty: 4Likely to be moderately difficult.priority: NormalNormal priority concern or feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions