#Better history matches

5 messages · Page 1 of 1 (latest)

placid stirrup
#

(I would prefer to post this in ⁠questions-and-feedback but it says I don't have the required permissions).

Warp history searches prioritize matching the first word of a command, rendering it useless in many cases. Here, I search for the word default and it mostly shows me 4-5 month old commands instead of something I wrote 6 minutes ago (1st screenshot).

Compare this to iTerm, which helpfully shows me a bunch of relevant and recent commands (2nd screenshot).

Is there any way to get the iTerm-like behavior?

rustic thistleBOT
#

Hi @placid stirrup. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

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:

  1. 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.

  2. Try the history | grep approach: You can run history | grep default to see all commands containing "default" anywhere in the command.

  3. 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.

#

I'd recommend upvoting the relevant GitHub issues to show interest in this feature improvement.

I hope this helps clarify the current situation!

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

placid stirrup
#

@upper path see here