emacsorphanage / helm-ag

The silver searcher with helm interface
492 stars 76 forks source link

make helm-ag-ignore-patterns works with rg. #388

Open zw963 opened 2 years ago

zw963 commented 2 years ago

Because ag use --ignore PATTERN to Ignore files/directories whose names match this pattern. Literal file and directory names are also allowed.

But, when use with rg, we have to hard-code following function to support it.

e.g.

(defun helm-ag--construct-ignore-option (pattern)
  "Not documented, PATTERN."
  (concat "--glob=" pattern))  ;; => we have to change `--ignore` to `--glob=` to support rg

;; now, rg can work with ignore pattern.
 '(helm-ag-ignore-patterns '("!*~" "!#*#" "!*.min.*" "!TAGS" "!tags" "!.git/"))
pataquets commented 7 months ago

@zw963 You might be interested in the thread at #16200, which might provide you some useful info. Check it out and see if it helps. Just updating helm-ag fixed it for me.

zw963 commented 7 months ago

where is the #16200 ?

bostonaholic commented 7 months ago

where is the #16200 ?

@zw963, here: https://github.com/syl20bnr/spacemacs/issues/16200

zw963 commented 7 months ago

where is the #16200 ?

@zw963, here: syl20bnr/spacemacs#16200

Cool, nice, will try it later, thanks