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-grep-or-swiper: error code 2 #700

Closed
bbigras opened this issue Oct 4, 2016 · 5 comments
Closed

counsel-grep-or-swiper: error code 2 #700

bbigras opened this issue Oct 4, 2016 · 5 comments

Comments

@bbigras
Copy link

@bbigras bbigras commented Oct 4, 2016

When I run counsel-grep-or-swiper and type something I get "error code 2".

I have grep installed. Not sure how to debug.

GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.9) of 2016-09-18

@CSRaghunandan
Copy link

@CSRaghunandan CSRaghunandan commented Oct 4, 2016

I had opened a thread about the same problem a few hours ago. The problem happens when there is a space in the directory name which contains the file in which you are running counsel-grep or counsel-grep-or-swiper. Remove the space and it should work fine

@abo-abo
Copy link
Owner

@abo-abo abo-abo commented Oct 5, 2016

@brunoqc Does that solve your problem?
@CSRaghunandan Thanks, I'll try to make it work for directories with spaces.

@abo-abo abo-abo closed this in db9d7b8 Oct 5, 2016
@bbigras
Copy link
Author

@bbigras bbigras commented Oct 5, 2016

Removing the space did fix the problem and I also don't have the problem with the new version (even if there's a space).

@abunbux
Copy link

@abunbux abunbux commented Aug 2, 2019

Did not solve the problem.
Screenshot_20190802_140211

@abunbux
Copy link

@abunbux abunbux commented Aug 2, 2019

found a mistake -
(let ((cmd (cond ((executable-find "rg") "rg -S --no-heading --line-number --color never '%s' %s") ((executable-find "ag") "ag -S --noheading --nocolor --nofilename --numbers '%s' %s") (t counsel-grep-base-command)))) (setq counsel-grep-base-command cmd))

after commenting - everything works

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

Successfully merging a pull request may close this issue.

None yet
4 participants