Skip to content
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

Add -0 shortcut for --null #419

Closed
caedn opened this issue Mar 26, 2017 · 3 comments
Closed

Add -0 shortcut for --null #419

caedn opened this issue Mar 26, 2017 · 3 comments
Labels
enhancement An enhancement to the functionality of the software. help wanted Others are encouraged to work on this issue. question An issue that is lacking clarity on one or more points.

Comments

@caedn
Copy link

caedn commented Mar 26, 2017

I've use ag with -0 a lot to safely pipe it into xargs. Any chance you could add the same alias so I don't have to type as much when switching to rg?

@BurntSushi
Copy link
Owner

I'd be willing to add a -Z short flag for --null, since that's what grep does. (ripgrep obviously takes a certain amount of inspiration from ag, but when there's a choice to be made with respect to flags, I've tended to side with GNU grep because of its ubiquity.)

@BurntSushi BurntSushi added enhancement An enhancement to the functionality of the software. help wanted Others are encouraged to work on this issue. question An issue that is lacking clarity on one or more points. labels Mar 26, 2017
@caedn
Copy link
Author

caedn commented Mar 27, 2017

That makes sense for GNU grep. Do note that BSD grep (which ships with macOS) behaves differently:

-Z, -z, --decompress
         Force grep to behave as zgrep.

Neither grep uses -0. I'm fine with -Z too though.

@BurntSushi
Copy link
Owner

Yuck. I'd like ripgrep to support decompression some day. I still lean towards -Z... However, -0 also has precedent, e.g., with xargs.

kpp added a commit to kpp/ripgrep that referenced this issue Mar 28, 2017
BurntSushi pushed a commit that referenced this issue Mar 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement to the functionality of the software. help wanted Others are encouraged to work on this issue. question An issue that is lacking clarity on one or more points.
Projects
None yet
Development

No branches or pull requests

2 participants