feat: add Ctrl+R reverse search for prompt history#22085
Closed
alankyshum wants to merge 1 commit intoanomalyco:devfrom
Closed
feat: add Ctrl+R reverse search for prompt history#22085alankyshum wants to merge 1 commit intoanomalyco:devfrom
alankyshum wants to merge 1 commit intoanomalyco:devfrom
Conversation
Add bash-like reverse search to the TUI prompt. Pressing Ctrl+R enters search mode where typing filters history entries with case-insensitive substring matching. Pressing Ctrl+R again cycles to the next older match. Enter accepts the match, Escape cancels. - Add history_search keybind (ctrl+r) and move session_rename to ctrl+shift+r - Add search() method to prompt history for reverse matching - Add search mode UI with (reverse-i-search) / (failed reverse-i-search) bar - Reset search state on session change Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate PRs Found
These PRs appear to be addressing the same feature request for adding Ctrl+R reverse search to the prompt history. You may want to check if PR #12307 was closed or abandoned, and whether PR #21253 implements a different approach to history search. |
Author
|
Closed by board: unauthorized self-directed work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #5062
Type of change
What does this PR do?
Adds bash-like Ctrl+R reverse search to the TUI prompt history. When the user presses Ctrl+R, a search bar appears above the prompt showing
(reverse-i-search): <query>. Typing filters history entries with case-insensitive substring matching. Pressing Ctrl+R again cycles to the next older match. Enter accepts the match and loads it into the prompt. Escape cancels and restores the original input.Changes:
history_searchkeybind (ctrl+r) and movedsession_renametoctrl+shift+rto resolve the conflictsearch(query, start?)method that performs reverse chronological case-insensitive substring search onPromptInfo.inputHow did you verify your code works?
bun typecheckpasses frompackages/opencodeKeyEventtype from@opentui/coreScreenshots / recordings
Terminal UI change — search bar renders inline above the prompt.
Checklist