branch: master
commit 8268b2267399fdc06438b6969df3de59e65f2d7d
Author: Bailey Ling <[email protected]>
Commit: Bailey Ling <[email protected]>
counsel.el: fix default ag command on windows
---
counsel.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index 8fefad9..9e770ca 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1992,7 +1992,10 @@ It applies no filtering to ivy--all-candidates."
(define-key map (kbd "M-q") 'counsel-git-grep-query-replace)
map))
-(defcustom counsel-ag-base-command "ag --nocolor --nogroup %s"
+(defcustom counsel-ag-base-command
+ (if (memq system-type '(ms-dos windows-nt))
+ "ag --vimgrep %s"
+ "ag --nocolor --nogroup %s")
"Format string to use in `counsel-ag-function' to construct the command.
The %s will be replaced by optional extra ag arguments followed by the
regex string. The default is \"ag --nocolor --nogroup %s\"."