bbatsov / helm-projectile

Helm UI for Projectile
327 stars 71 forks source link

helm-projectile-grep not finding project root #139

Open eamonnsullivan opened 4 years ago

eamonnsullivan commented 4 years ago

Expected behavior

When inside a git repo, running helm-projectile-grep shouldn't ask me for a starting directory.

projectile-grep (the non-helm flavor) works as expected.

Possibly an unintended side effect of this commit?

Actual behavior

The command asks me for a starting directory and then only finds results under that directory.

Steps to reproduce the problem

  1. open a file deep in a git repo
  2. run M-x helm-projectile-grep (Previously, this would start a project-wide search based on the word my cursor is on.)
  3. it asks for a starting directory.

Backtraces if necessary (M-x toggle-debug-on-error)

There's no error. This is how projectile and helm-projectile are configured for me:

(use-package projectile
  :demand
  :diminish projectile-mode
  :init
  (use-package helm-projectile
    :config
    (helm-projectile-on)
    :bind (("C-c p p" . helm-projectile-switch-project)))
  (setq projectile-use-git-grep t)
  :config
  (projectile-mode t)
  (setq projectile-completion-system 'helm)
  (setq projectile-switch-project-action 'projectile-find-file)
  (add-to-list 'projectile-globally-ignored-directories "node-modules")
  (add-to-list 'projectile-globally-ignored-files "node-modules")
  :bind   (("s-f" . projectile-find-file)
           ("s-F" . projectile-grep)))

Environment & version information

eamonnsullivan commented 4 years ago

I found it. It's the addition of "D" in interactive in helm-projectile-grep and helm-projectile-ack. I'll submit a patch?

eamonnsullivan commented 4 years ago

https://github.com/bbatsov/helm-projectile/pull/140

bbatsov commented 4 years ago

The problematic commit was reverted. I didn't pay much attention to it. Sorry about that!