branch: master
commit c2b0d30515a2fe2741c850b5bb699cf56b69b9d0
Author: Fabrice Popineau <[email protected]>
Commit: Oleh Krehel <[email protected]>
Add missing parameter for ag
Fixes #858
---
counsel.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index 4829515..b76f938 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1685,7 +1685,7 @@ If non-nil, EXTRA-AG-ARGS string is appended to BASE-CMD."
(let* ((args-end (string-match " -- " extra-ag-args))
(file (if args-end
(substring-no-properties extra-ag-args (+ args-end 3))
- ""))
+ default-directory))
(extra-ag-args (if args-end
(substring-no-properties extra-ag-args 0
args-end)
extra-ag-args))
@@ -1693,6 +1693,7 @@ If non-nil, EXTRA-AG-ARGS string is appended to BASE-CMD."
(concat extra-ag-args
" -- "
(shell-quote-argument regex)
+ " "
file))))
(if (file-remote-p default-directory)
(split-string (shell-command-to-string ag-cmd) "\n" t)