Evidlo / passhole

A secure hole for your passwords (KeePass CLI)
GNU General Public License v3.0
199 stars 19 forks source link

(FR) Implement Fuzzy search #54

Open lbesnard opened 2 years ago

lbesnard commented 2 years ago

Implementing Fuzzy search would (I believe) improve greatly the user experience. Once used in other cli tools, it's hard to go back.

Python package: https://pypi.org/project/fuzzysearch/

I'm happy to look at trying to implement it and create a PR if interested

thanks for a great tool. Perfect with i3/dmenu

Evidlo commented 2 years ago

Which command are you talking about? Can you give examples for what you mean?

lbesnard commented 2 years ago

I meant to replace maybe the grep function with the python package mentioned above: https://github.com/Evidlo/passhole/blob/master/passhole/passhole.py#L758

As an example, this is a way of how this works with the commandline https://github.com/junegunn/fzf

This means that if you're looking for example for an entry named "password_spotify_all_familly", you could only type "psspotifam" and even with some typo.

Evidlo commented 9 months ago

I'm open to this idea, but it needs to be implemented through regular expressions as that's what's used under the hood for searching.

Something like this would be ideal, but I don't think that XML regex supports lookaheds.

An option might be to substitute spaces with '.' so that ps spoti fam would give the regex `ps.spoti.*fam` and that would match your example.