Using Forward/ReverseSearchHistory and fuzzy matching across entire history entry
Is it possible to use forward or reverse search history with a bit of fuzzy logic? Also, is it possible to do partial matches across the entire line? I ask because in zsh I'll often search for the first command and then part of the rest of the command, consider the following:
get-history
1 telnet example.com 25 2 telnet example.com 3389 3 telnet example.com 80
ReverseSearchHistory
telnet 25
the last command would match the first history id, currently it fails the backwards check.
Maybe not quite what you're asking, but I had considered using a regex or wildcard search instead of a simple "starts with".
Do you know of any documentation on how zsh does it's fuzzy search? I read most of the zle documentation and don't recall seeing this capability.
You know, after reviewing this a little more, maybe I'm just crazy. It doesn't seem to work the way I remembered.
As far as the fuzzy logic: see the docs here: http://arcib.dowling.edu/cgi-bin/info2html?(zsh)Control%2520Functions under the function _approximate
I'll leave this open because I think I'd like regex or wildcard matching.
You can open an issue here https://github.com/lzybkr/TabExpansionPlusPlus to request fuzzy expansion.
To add to this, I would really like to see smth like cd C:\us\ba\de to expand into cd C:\Users\bazzilic\Desktop when I hit <Tab>.
Have you guys checked PSFzf? https://github.com/kelleyma49/PSFzf it's a module for adding FZF capabilities for PowerShell (such as changing the current folder or navigating the history interactively with FZF).
I used it all the time before the predition feature, and I still resort to it whenever I need to come back to a command which I remember just vaguely.