1

I am running the command helm-do-grep and I notice that the search is not recursive, i.e. it searches only in the directory I specify and not in subdirectories. How do I direct helm-grep to automatically search recursively?

incandescentman
  • 4,111
  • 16
  • 53

1 Answers1

1

helm does offer a non-recursive and a recursive command, by default it's using the non-recursive one when invoking M-x helm-do-grep unless it has been called with a prefix argument. The values for the non-recursive and recursive command are stored in the helm-grep-default-command and helm-grep-default-recurse-command variables.

The easiest way of achieving recursion by default would be setting the former variable to the value of the latter.

(eval-after-load 'helm-grep
  '(setq helm-grep-default-command helm-grep-default-recurse-command))

Caution: The solution above might have unintended consequences, such as using grep on the buffers list to recurse on every listed file.

wasamasa
  • 21,803
  • 1
  • 65
  • 97