zsh-users / zsh-history-substring-search

🐠 ZSH port of Fish history search (up arrow)
2.63k stars 156 forks source link

History search results after the substring should not be fuzzy #95

Open SephVelut opened 6 years ago

SephVelut commented 6 years ago

I thought disabling HISTORY_SUBSTRING_SEARCH_FUZZY would also disable search pattern *abc* but that's not the case.

local search_pattern="*${(j:*:)_history_substring_search_query_parts[@]//(#m)[\][()|\\*?#<>~^]/\\$MATCH}*"

Pattern always starts with a *. Fuzzy searching as I imagined would leave the position of a substring the same in the query. Search results for disabled fuzzy searching should always start with abc then match fuzzy abc*d*

SephVelut commented 6 years ago

Opened a PR #96