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

counsel-ag + ivy-occur bash error #1240

Closed
SkySkimmer opened this issue Oct 16, 2017 · 4 comments
Closed

counsel-ag + ivy-occur bash error #1240

SkySkimmer opened this issue Oct 16, 2017 · 4 comments

Comments

@SkySkimmer
Copy link

Reproduction:

  • counsel-ag
  • search for a _b (regardless of presence of matches) (in general string - space - string starting with underscore)
  • ivy-occur

Result: occur buffer containing

-*- mode:grep; default-directory: "[redacted]" -*-


2 candidates:
.//bin/bash: -c: line 0: syntax error near unexpected token `('
.//bin/bash: -c: line 0: `ag --nocolor --nogroup (a).*?(_b)'

This doesn't seem to happen with counsel-grep.

@abo-abo
Copy link
Owner

abo-abo commented Oct 16, 2017

Thanks.

@SkySkimmer
Copy link
Author

There are still quoting issues, with " for ag and ' for grep. Maybe use shell-quote-argument like counsel-grep does to pass the filename?

abo-abo added a commit that referenced this issue Oct 16, 2017
* counsel.el (counsel-grep-like-occur): Update.
(counsel-rg-base-command):
(counsel-grep-base-command): Add warning not to use single quotes.
(counsel-grep-function): Update.
(counsel-grep-occur): Update.

Fixes #1240
@abo-abo
Copy link
Owner

abo-abo commented Oct 16, 2017

Thanks again. Please test, again.

@SkySkimmer
Copy link
Author

Seems to work. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants