I am using trying to use a command called counsel-rg
. This is the associated describe-command
:
counsel-rg is an autoloaded interactive compiled Lisp function in
‘counsel.el’.
(counsel-rg &optional INITIAL-INPUT INITIAL-DIRECTORY EXTRA-RG-ARGS
RG-PROMPT)
Grep for a string in the current directory using ‘rg’.
INITIAL-INPUT can be given as the initial minibuffer input.
INITIAL-DIRECTORY, if non-nil, is used as the root directory for search.
EXTRA-RG-ARGS string, if non-nil, is appended to ‘counsel-rg-base-command’.
RG-PROMPT, if non-nil, is passed as ‘ivy-read’ prompt argument.
Example input with inclusion and exclusion file patterns:
require i -- -g*.el
Although the definition does not mention it, for me I use this command as an interface of ripgrep
.
It is a command that helps me find stuff on the code base.
There is a weird behavior happening, though.
If I type to search "Book
, I can see:
As you see, one of the results retrieved is "Book JE"
. Hence, I tried to search for it:
This feels weird to me since the output does not show the result that I was expecting to see. In addition, as you see, the mini-buffer indicates that an "error code 2" happened.
Why is this happening? Why I can't index an expression that was actually previously found?
What is an "error code 2"?
Obs.: If this is relevant, this is my init file in Emacs. And I am using Macbook Air M1 Monterey 12.6.
UPDATE
I tried the approach suggested by db48x, but it did not work out:
Observation: Follow another suggestion that appeared on the comment section, I also tried writing (trace-function 'call-process)
on the scratch buffer, putting the cursor after the last parenthesis, and executing the command eval-last-sexp
. It returns nil
.
"Book\ JE"
. What does that give you?(trace-function 'call-process)
in the scratch buffer.eval-last-sexp
? I did that and it returnsnil
. Thanks for another iteration!call-process
function was called, and with what arguments.