Skip to content

Add Ctrl+R reverse history search to terminal - #27

Draft
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/terminal-emulation-feature-2d46
Draft

Add Ctrl+R reverse history search to terminal#27
cursor[bot] wants to merge 1 commit into
mainfrom
cursor/terminal-emulation-feature-2d46

Conversation

@cursor

@cursor cursor Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds Bash-style Ctrl+R reverse command history search to the portfolio terminal.
  • Adds a tested searchCommandHistory helper for newest-to-oldest matching, cycling, and wraparound.
  • Updates terminal hints, history manual text, and README shortcut docs.

New Issue Description

Problem

The site aims to feel like a terminal emulator, but command history only supported Up/Down navigation. Users could not quickly search previous commands by substring, which is a common shell workflow.

Proposed Improvement

Implement Ctrl+R reverse history search:

  • Ctrl+R enters reverse search mode.
  • Typing narrows matches case-insensitively.
  • Repeated Ctrl+R cycles older matching commands and wraps.
  • Enter executes the selected command.
  • Esc, Ctrl+C, or Ctrl+G cancels and restores the original input.

Acceptance Criteria

  • Users can recall and execute a previous command via Ctrl+R without touching Up/Down history navigation.
  • Search behavior is covered by unit tests for matching, cycling, wraparound, and no-match cases.
  • The shortcut is discoverable in onboarding hints, man history, and README docs.

Validation

  • pnpm check passed via the pre-push hook: lint, Prettier check, Vitest coverage (69 tests), and Astro build.
  • Manual browser walkthrough recorded: /opt/cursor/artifacts/ctrl_r_reverse_history_search_walkthrough.mp4.
Open in Web View Automation 

Co-authored-by: Jakob Langtry <jjalangtry@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant