Feature Proposal: Command History Search Enhancement with Up Arrow - Match History from Prefix
Issue
Problem:
Currently, when using aider, pressing the up arrow cycles through all previous inputs, including full chat messages and commands. This can be inefficient, especially when trying to quickly re-run a command from history. Often, chat inputs are long, and sorting through them to find a specific command can be time-consuming.
Proposed Solution:
Implement a feature that allows users to filter command history based on what they've already typed. For example:
- If the user types a command prefix, such as
!(shorthand for/run), and then presses the up arrow, it should only cycle through recent commands that match the prefix (e.g.,/runcommands), rather than cycling through all previous inputs.
This would allow users to easily re-run commands without having to manually scroll through lengthy chat histories.
Example Use Case:
- Typing a Command:
- User types
!to indicate they want to run a command (e.g.,!test).
- User types
- Press Up Arrow:
- Pressing the up arrow will now filter the history to show only past commands that start with
/run, or more specifically/run testif they've typed!test.
- Pressing the up arrow will now filter the history to show only past commands that start with
- Efficient Access to History:
- This saves time by allowing users to quickly find and re-run relevant commands without scrolling through unrelated chat inputs.
Why This is Useful:
- Efficiency: Users can quickly re-run commands they've executed before without having to scroll through lengthy chat history.
- Precision: Filtering based on what has been typed ensures that users only cycle through relevant commands, improving the speed of the workflow.
- Familiarity: This feature mimics behavior found in many shell environments, providing a more intuitive experience for users who are accustomed to this functionality.
This feature would enhance the overall experience by making the command history more accessible and usable, particularly in sessions with long or numerous chats.
Version and model info
No response
Thank you for filing this issue.
You can search backwards through the command history with Ctrl-R, see also -> https://aider.chat/docs/usage/commands.html#keybindings
I'm going to close this issue for now, but feel free to add a comment here and I will re-open. Or feel free to file a new issue any time.