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 counsel-rg for ripgrep #784

Merged
merged 1 commit into from Nov 19, 2016

Conversation

Projects
None yet
4 participants
@manuel-uberti
Contributor

manuel-uberti commented Nov 19, 2016

This lets you use ripgrep via Counsel. It basically reuses counsel-ag like counsel-pt does.

I ran make compile, make test and M-x checkdoc before submitting this PR.

@manuel-uberti manuel-uberti changed the title from Add `counsel-rg` to Add counsel-rg for ripgrep Nov 19, 2016

Add `counsel-rg`
This lets you use [ripgrep](https://github.com/BurntSushi/ripgrep) via Counsel.

@abo-abo abo-abo merged commit 5190412 into abo-abo:master Nov 19, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@abo-abo

This comment has been minimized.

Owner

abo-abo commented Nov 19, 2016

Thanks.

@manuel-uberti

This comment has been minimized.

Contributor

manuel-uberti commented Nov 19, 2016

Thank you for merging so quickly!

@abo-abo

This comment has been minimized.

Owner

abo-abo commented Nov 19, 2016

Well, with magit's fa, mm 784, PP it's indeed quick to merge.

@manuel-uberti

This comment has been minimized.

Contributor

manuel-uberti commented Nov 19, 2016

Actually, sorry, there is a bug: when I hit RET on the matching candidate, I don't get moved to its position in the buffer. Point doesn't move at all.

@CSRaghunandan

This comment has been minimized.

CSRaghunandan commented on counsel.el in 5190412 Nov 19, 2016

Can we have the counsel-rg-base-command as "rg -i %s" so that cases are ignored as well while searching? I asked this since swiper ignores cases as well. It's better to have consistency of features.

This comment has been minimized.

Contributor

manuel-uberti replied Nov 19, 2016

It is already ignoring case on my side.

This comment has been minimized.

Contributor

kaushalmodi replied Nov 19, 2016

@CSRaghunandan As it's a defcustom, you can customize that easily in your emacs config. @manuel-uberti Do you have rg aliased with -i in your shell config by any chance? It is case sensitive by default.

> echo "Abc" | \rg 'a'
> echo "Abc" | \rg -i 'a'
1:Abc

This comment has been minimized.

Contributor

manuel-uberti replied Nov 19, 2016

^ Nailed it. Thanks. I'll update latest PR (it's yet to be merged)

This comment has been minimized.

Contributor

kaushalmodi replied Nov 19, 2016

@manuel-uberti Cool! You can even use \\rg instead of rg so counsel-rg-base-command works as expected without picking up the alias version. Example.

This comment has been minimized.

Contributor

manuel-uberti replied Nov 19, 2016

@kaushalmodi oh great. Well, I'll let the user customize that. :-)

@CSRaghunandan

This comment has been minimized.

CSRaghunandan commented on counsel.el in 5190412 Nov 19, 2016

when I search for a string and press enter to select a search candidate, it does not jump to the search result. The cursor doesn't move.

@manuel-uberti

This comment has been minimized.

Contributor

manuel-uberti commented Nov 19, 2016

Yes, I know, but I fixed with this PR: #785

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment