-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better filtering #92
Comments
Also add
|
These ones might be tricky to implement on the CLI side. I'll try to come up with source code to take inspiration from. |
Oh yeah, and there's obviously Ripgrep, but as its author said recently on r/rust, the source code isn't always straightforward. |
Aha. Got one. Watchexec does this in a very straightforward way:
|
Yeah, I like this one too! I'm thinking something like For the second point (a way to filter annotations containing any of the given tags (instead of all)) I'm thinking of an |
Using If you're willing to take that route, you'll probably also need to add parentheses, like GNU find (see the OPERATORS section) or Git-annex do. I just cannot think of relevant code in Rust at the moment. |
Jeez... that was fast ! I'll test this as soon as I can, by tomorrow in any case. |
I couldn't resist and compiled the branch. I guess you're aware of this, but just in case: Cheers |
Ooh I didn't actually think of that, right now the |
Hence the parentheses... |
Looks like clap doesn't really have support for things like this. The only example I could find is here where they write their own parsing code for filter arguments. I'm considering if it's worth the effort or if there's a simpler workaround on top of the current PR. One option is to add an For everything else I think the current PR and the Do you have any other queries/situations in mind that need extra handling? The only one I can think of that can't be handled by search is to find annotations within a certain time period but not on a certain day within that time period or something like that, which can be solved with two searches instead of one (not ideal of course but not a dealbreaker I'd say) |
Ha ! Good catch, I didn't dig that deep.
This would indeed be the most simple to implement, and it seems reasonable.
I feel like I need to be using the tool to be able to confront it with different situations and answer your question properly; but I'm sure that simply adding such |
Great! On it then 😄 |
Thanks, and godspeed to you ! |
See some comments in #89 here
The text was updated successfully, but these errors were encountered: