I am on MacOS (darwin) and when I attempt helm-do-grep-ag
I get a zsh error zsh:1: command not found: ag
. What is the proper way to address this?
My ag is homebrewed and so is in /usr/local/bin
I verified the setting of PATH in both bash and zsh startup, and if I open a shell inside emacs I see /usr/local/bin there. (pasted from emacs shell session:)
echo $PATH
/Users/cgrandi/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
I then also tried adding it to the exec-path
variable:
Its value is
("/usr/local/bin" "/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Applications/Emacs.app/Contents/MacOS/libexec" "/Applications/Emacs.app/Contents/MacOS/bin")
I note that variable is defined in 'C source code' and so I suspect it does not influence commands executed from 'helm-grep.el'
As a workaround I customize the variable helm-grep-ag-command
to include the explicit full path
Its value is
"/usr/local/bin/ag --line-numbers -S --color --nogroup %s %s %s"
Original value was
"ag --line-numbers -S --color --nogroup %s %s %s"
But I suspect that is not the proper way to do it. Is this in fact the best way to address that? Or is there a more proper way?