apainintheneck / cgrep Goto Github PK
View Code? Open in Web Editor NEWconditional grep
License: MIT License
conditional grep
License: MIT License
The -l
and -L
options display filenames based upon match patterns currently. The thing is they don't actually show the matches just the filenames where the matches took place. It would make more sense for there to be no restrictions requiring match parameters (denoted by the equal sign) when either of these options is passed to the program.
This change would involve rewriting some of the validation code for patterns and the grep function to allow printing when a match pattern doesn't exist.
I think it would be a good idea to add some sort of command that reruns the previous search or allows you to save it as a query as described in #1. This would be especially helpful when making long complicated queries. Editing wouldn't necessarily be an option but you should be able to open it in a text editor yourself even though it isn't in the application per se.
Since cgrep allows you to make queries using pattern files, the next logical step would be to have some way to bookmark common queries. This would require some new flag like --query=query-name
. Behind the scenes I think this could just function the same way as the pattern files but instead of requiring the path they would just be stored in some common location by their query name.
$ cgrep -q=latest-casks *.rb
There should also be some way to bookmark the previous query as well. (Usually you want to try the query first before deciding if it's worth saving.) Queries could also be imported from pattern files as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.