timvisee / prs

🔐 A secure, fast & convenient password manager CLI using GPG and git to sync.
https://gitlab.com/timvisee/prs
GNU General Public License v3.0
211 stars 8 forks source link

Fuzzier searching in prs #26

Open colemickens opened 11 months ago

colemickens commented 11 months ago

Hi,

I have started a new company and have been making my entries like <company>/discord.com to align with previous naming schemes. Let's say its bigco.

However, I am used to doing prs show disco or some other shortened for my usual full entry names.

Now though, this is a bit of a pain, as I wind up having to interactively select each time.

Helix has a particularly-fuzzy search that lets me type things like pkgtoonixdefault to get to pkgs/tools/package-management/nix/default.nix with minimal typing. My brain is fairly tuned to this "type some unique-ish path characters in order and get there fast".

Similarly, it would be nice to be able to do prs show bigcodisco and have it match to bigco/discord.com. What do you think?

I considered a separate password-store and a xprs command that sets PASSWORD_STORE, which to be honest, might be better for separation of concerns, but becomes a bit of a mess to think about with respect to my syncing story and usage with Android-Password-Store.

Maybe you have another idea? If not, maybe it's possible to re-use the algorithm from the interactive fuzzy finder to do matches on the CLI? If that's not too much magic?