I understand your frustration with Warp's history search behavior. Based on the knowledge sources, this is a known limitation in Warp's history search functionality.
Currently, Warp's history search does prioritize matching the beginning of commands rather than fuzzy searching throughout the entire command text. This differs from the behavior you're experiencing in iTerm, which appears to be using a more flexible fuzzy search approach.
There are a few workarounds you might try:
-
Use the UP arrow method: After typing part of your command, press UP to filter through history with that prefix. This might help with some cases but won't solve your specific issue with searching for words in the middle of commands.
-
Try the history | grep approach: You can run history | grep default to see all commands containing "default" anywhere in the command.
-
Expand the search panel: When using CTRL+R for history search, you can expand the panel to see more of your commands, though this doesn't change the search algorithm.
This issue has been reported multiple times in Warp's GitHub repository. For example, in issue #149, users have requested FZF-like fuzzy search capabilities, and in issue #4964, users have noted issues with history search prioritization.
One user specifically mentioned: "Sometimes I try to search for a string in the middle of the command and the search will prioritise all commands which start with that string instead of sorting by recency."
Unfortunately, there doesn't appear to be a setting to change this behavior currently. The Warp team is aware of these limitations, but until they implement improvements, you might need to rely on the workarounds mentioned above.