pass and a GNOME search provider

I have been using pass, the “standard unix password manager”, for quite a while now. And I love having it at my disposal because I cannot remember all the account names and different passwords associated with them. Moreover, I can easily distribute the passwords by cloning a repository on the machine I want to have them on. The basic idea is stupidly simple: you tell pass your default GPG key that it uses to symmetrically encrypt a file containing the password and additional metadata. Groups of passwords are created storing them in different sub-directories. On password retrieval pass will print the password or copy it to the clipboard for a limited time.

Now, I love the command line but my main use for a password manager is of course to store passwords for websites. Therefore opening a terminal typing pass and tab-complete the correct password is time consuming and slow. Thankfully, Jonathan Lestrelin wrote a search provider for GNOME shell which means you can simply type the meta key and the password and it will ask pass to open the chosen password. Unfortunately, the search itself was implemented by matching the search term against a regular expression which works well if you type the groups and passwords correctly but fails if you want to search more lazily. I asked for inclusion of a very simple difflib.SequenceMatcher ranked search and now that it is in, it’s just perfect.