-
Notifications
You must be signed in to change notification settings - Fork 66
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
-x and --type=format options should be mutex #367
Comments
this is consistent with the behavior of but one can argue that according to Principle of Least Surprise, we're consistently wrong, that file type filters should apply to (supposedly) explicit file lists (including |
@n1vux - adding my vote on feeling consistently surprised by this feature. Would it make more sense if we consider CLI arguments are really intended to bypass This would make the following invocations equivalent, which seems clean to me. Currently, only the single one diverges from the rest of them. ack -f --type=json | ack -x foo
ack -f | ack -x --type=json foo # doesn't work today :(
ack --type=json foo (caveat - only the last form can handle filenames with newlines in them 😞. Would it be pushing it to ask for find's --files0-from or xarg's -0/--null while we're here?) Also, it'd be really nice if |
Please, don't conflate "doesn't work" with "doesn't do what I want it to do." ack -x works exactly as I intended it. |
I've added a new ticket #368 for discussing a new flag that could act like |
If I have something like this:
I will be surprised that the
--noperl
does nothing because-x
already knows it is getting files from stdin, and does no filtering. I should get a mutex warning that-x
and--noperl
can't be used together.The text was updated successfully, but these errors were encountered: