Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Add the ability to bookmark common queries #1

Closed
apainintheneck opened this issue May 31, 2022 · 2 comments
Closed

Add the ability to bookmark common queries #1

apainintheneck opened this issue May 31, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@apainintheneck
Copy link
Owner

apainintheneck commented May 31, 2022

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.

@apainintheneck apainintheneck added the enhancement New feature or request label May 31, 2022
@apainintheneck
Copy link
Owner Author

apainintheneck commented Jun 13, 2022

The more I think about this the more I come to the conclusion that the simplest solution would just be to allow users to bookmark the previous query. A simple --save=query-name option should do the trick. This command would take precedence over all others.

@apainintheneck
Copy link
Owner Author

I'm closing this as not planned. I think #2 covers 99% of my use cases.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant