ericdanan / counsel-projectile

Ivy UI for Projectile
286 stars 39 forks source link

duplicate counsel-projectile-rg results in Emacs-25 #122

Closed rski closed 5 years ago

rski commented 5 years ago

In emacs25, trim string right has no argument for the regex. counsel-projectile does:

string-trim-right counsel-rg-base-command " \\.")

To strip the trailing spacedot in counsel-rg-base-command:

rg -S --no-heading --line-number --color never %s .

However, this doesn't work, so as far as I can tell, it uses the original base-command, which results in me seeing duplicate results when calling counsel-projectile-rg. This problem doesn't exist in Emacs 26, which has an argument.

If I have some time I'll send a patch to fix this. If you don't want to support Emacs-25 that's cool, I should be able to patch string-trim-right locally in my config for Emacs-25.

ericdanan commented 5 years ago

Just copied the emacs 26 string-trim-right function into counsel-projectile, please let me know if that works.

rski commented 5 years ago

it does, thanks a lot!