diff options
author | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-10-08 08:15:54 +0200 |
---|---|---|
committer | Thierry Volpiatto <thierry.volpiatto@gmail.com> | 2016-10-08 08:24:30 +0200 |
commit | 04c4545b6fc131d43937fd4f3a85610d66fd309e (patch) | |
tree | e0f9e098d95f6aca77bc5efb5647407906c96242 /helm-grep.el | |
parent | 477fb280fe9bed735ee68f4aa9541a3cf477ae70 (diff) |
Fix smartcase for multiple regexp in grep (#1618).
* helm-grep.el (helm-grep--prepare-cmd-line): Do it.
Diffstat (limited to 'helm-grep.el')
-rw-r--r-- | helm-grep.el | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/helm-grep.el b/helm-grep.el index 1bba7523..063436bd 100644 --- a/helm-grep.el +++ b/helm-grep.el @@ -427,11 +427,14 @@ It is intended to use as a let-bound variable, DON'T set this globaly.") (pipes (helm-aif (cdr patterns) (cl-loop with pipcom = (pcase (helm-grep-command) + ;; Use grep for GNU regexp based tools. ((or "grep" "zgrep" "git-grep") - "grep --color=always") + (format "grep --color=always %s" + (if smartcase "-i" ""))) + ;; Use ack-grep for PCRE based tools. ;; Sometimes ack-grep cmd is ack only. ((and (pred (string-match-p "ack")) ack) - (format "%s --color" ack))) + (format "%s --smart-case --color" ack))) for p in it concat (format " | %s %s" pipcom (shell-quote-argument p))) ""))) |