Giter Club home page Giter Club logo

cgrep's People

Contributors

apainintheneck avatar

Watchers

 avatar  avatar

cgrep's Issues

Match patterns should not be required when `-l` or `-L` are set

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.

Rerun previous search

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.

Add the ability to bookmark common queries

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.

Example

$ 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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.