branch: master
commit 2d291911ef5d3cf29fd5e44ecc50b6270c1df18a
Author: Steve Purcell <[email protected]>
Commit: Oleh Krehel <[email protected]>
Stop counsel-ag-occur from breaking when search string begins with "-"
Fixes #1048
---
counsel.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index e29d246..6a2233b 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1842,7 +1842,7 @@ If non-nil, EXTRA-AG-ARGS string is appended to BASE-CMD."
(match-string 1 (buffer-name)))))))
(cands (split-string
(shell-command-to-string
- (format counsel-ag-base-command (shell-quote-argument
regex)))
+ (format counsel-ag-base-command (concat "-- "
(shell-quote-argument regex))))
"\n"
t)))
;; Need precise number of header lines for `wgrep' to work.