Closed Maeda1 closed 2 years ago
What you're probably looking for is X.P.FuzzyMatch, which implements a fuzzy search for the prompt
Only if you can integrate it with pass(1)
somehow. I suspect that's what the find
subcommand to it does.
fuzzyMatch is indeed very close to what pass find
does, except that it matches others too:
Example: "spr" matches FastSPR but also SuccinctParallelTrees because it's a subsequence of the latter: "S.......P.r..........".
Because of fuzzySort good relevance sorting (e.g., making "spr" matches first), I am adopting fuzzyMatch as a good solution.
Besides, that should be included by default for Prompt.pass, or highly recommended in the Prompt.pass documentation.
Besides, that should be included by default for Prompt.pass, or highly recommended in the Prompt.pass documentation.
You're probably right; I can't imagine people wanting to type out the whole path to their password every time. We should probably document this default though, in case users do want that. Fancy opening a PR?
You mean pull request by changing $usage in Pass.hs to add a note about that?
I mean changing mkPassPrompt
to automatically apply the fuzzy matcher and sorter, as well as document this in the module so that users who do not wish to use these features (or use other search predicates and sorters) know to turn them off.
(This would of course break backwards compatibility, but I think it's a worthwhile trade off to having yet another mkPassPrompt'
)
I am afraid that is out of my skills :disappointed:
No worries, I'll (try to, time permitting) prepare something tomorrow then
Problem Description
This is more a feature request than a problem.
Current problem: when opening the prompt in XMonad.Prompt.Pass, one must type the very first characters of an existing first level folder in $HOME/.password-store to show/match entries.
Pass utility has the find argument that can search based on a keyword and match any folder or any GPG file that contains the keyword, which is much more easier to find a password entry.
Steps to Reproduce
Assuming you have this $HOME/.password-store example entries: $HOME/.password-store/www/github/email.gpg $HOME/.password-store/www/github/password.gpg $HOME/.password-store/other/mybestwebsite/password.gpg
Using XMonad.Prompt.Pass:
Using pass:
pass find password
, then ENTERThat is a much better behavior and expected to have the same when using XMonad.Prompt.Pass
Checklist
[x] I've read CONTRIBUTING.md
I tested my configuration
xmonad
version 0.17.0-20xmonad-contrib
version 0.17.0-20