Coder Social home page Coder Social logo

Prefix Matching? about tofi HOT 3 OPEN

LordTlasT avatar LordTlasT commented on September 25, 2024
Prefix Matching?

from tofi.

Comments (3)

philj56 avatar philj56 commented on September 25, 2024

Interesting, that sounds like a nice idea (I nearly always search by just typing the beginning of the thing I'm looking for).

I think this probably should be combined with #49, and --fuzzy-match replaced with --matching-algorithm. This is also how rofi does it e.g. from the manpage:

-matching method

Specify the matching algorithm used.  Currently, the following methods
are supported:
       • normal: match the int string
       • regex: match a regex input
       • glob: match a glob pattern
       • fuzzy: do a fuzzy match
       • prefix: match prefix

I guess the tofi version would look like:

--matching-algorithm = normal | fuzzy | levenshtein | prefix

Tab completion of results also sounds interesting, but that would probably have to wait until (if) I make keybindings customisable.

from tofi.

LordTlasT avatar LordTlasT commented on September 25, 2024

Yes, this would be really neat.
Can't wait for it to be implemented :)
Thanks for the response, I hope it goes well.

from tofi.

philj56 avatar philj56 commented on September 25, 2024

Alright, this is done (without tab completion) in 574eff0. Sorry for the delay, I spent a while implementing Levenshtein distance, only to decide it isn't really any good for tofi 😅.

If you want to try it out from the AUR btw, there's a tofi-git package as well as the release package.

from tofi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.