Skip to content

Using Forward/ReverseSearchHistory and fuzzy matching across entire history entry #82

Open

Description

@frizop

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.

Activity

  1. lzybkr commented on Jan 29, 2014

    @lzybkr
    Contributor

    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.

  2. frizop commented on Jan 30, 2014

    @frizop
    Author

    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

  3. lzybkr commented on Jan 30, 2014

    @lzybkr
    Contributor

    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.

  4. bazzilic commented on Aug 14, 2015

    @bazzilic

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

  5. thomazmoura commented on Sep 13, 2022

    @thomazmoura

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions