Comments (2)
I like this idea a lot, thanks for suggesting it :)
I'll make it happen.
from ppl.
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!
from ppl.
Related Issues (20)
- include ppl edit <any-identifier> HOT 1
- Bash completion needs to escape shell tokens HOT 1
- Some questions about features and refactoring HOT 4
- Convert to use the vcard gem HOT 3
- Add support for the KIND field HOT 1
- Add support for the RELATED field HOT 1
- Add support for the NOTE field HOT 1
- Test out using the Thor gem for the CLI HOT 1
- Add more code quality tools and their badges HOT 5
- setting nickname erases name details in the vcard HOT 6
- autocomplete fails when it encounters invalid dates in the data set HOT 2
- ppl is destructively intolerant of tags it doesn't recognize HOT 1
- Colorized and aligned custom address book format HOT 1
- Not sure if Ruby version checking is doing the intended thing HOT 2
- Undo "ppl init" HOT 3
- create brew install HOT 1
- Mac/iOS integration HOT 1
- Windows OS Support HOT 1
- Strange error about "undefined method `version' for nil:NilClass (NoMethodError)" HOT 2
- ERROR: Failed to build gem native extension. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ppl.