You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One thing I've found missing from ppl is the ability to search (outside of Mutt).
I'd like to be able to do something like:
$ ppl search john
jdoe: John Doe <jdoe@example.com>
jsmith: John Smith <jsmith@foo.example.com>
mjohn: Matthew John <mjohn@bar.example.com>
Or even fuzzier:
$ ppl search jo
jdoe: John Doe <jdoe@example.com>
jsmith: John Smith <jsmith@foo.example.com>
jj: Joe Johnson <jj@example.com>
I have a lot of contacts, and I don't always remember everybody's id, which usually results in me running ppl ls | grep jo which works, but isn't as elegant, and I'm assuming not as fast as it could be.
What do you think?
The text was updated successfully, but these errors were encountered:
When I sat down to build this, I began to envision a number of problems with building my own DIY search system.
If the search string is present among the attributes of the contact, but isn't present in the output of ppl ls, should that contact be displayed in the output of the search?
If the answer to the question above is "yes", do I write some sort of algorithm that cleverly determines which attributes to include in the output based on which ones match the search?
Otherwise, do I implement a whole bunch of option flags for users to control the search space of their searches so that there can be no unintended matches?
Besides that, parsing every single contact's vCard and iterating through and examining them all seems like something that isn't going to increase ppl's already underwhelming speed.
So I've gone the simple route, and added a command called ppl grep. This command does almost nothing for itself, instead simply delegating all your input options and arguments to git grep. There are several benefits with this approach:
git grep is orders of magnitude faster than anything I could ever hope to implement myself.
Output always includes the matching line, making it clear which piece of contact data matched your search string
Regular expression searching is possible without me having to build anything
Case-sensitivity is optional, again without requiring any work on my part
Output is paged if it exceeds screen height
I know this isn't exactly what you asked for, but it's an approach that gives you the maximum performance and flexibility with the minimum possible development time on my part, so it was too good an option for me to pass up. I hope it meets your needs!
One thing I've found missing from ppl is the ability to search (outside of Mutt).
I'd like to be able to do something like:
Or even fuzzier:
I have a lot of contacts, and I don't always remember everybody's id, which usually results in me running
ppl ls | grep jo
which works, but isn't as elegant, and I'm assuming not as fast as it could be.What do you think?
The text was updated successfully, but these errors were encountered: