branch: master
commit 54c544756fedf08a642c3f6bfa1ca45f97122a00
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
counsel.el (counsel-grep-function): Add shell-quote-argument
e.g. to search for "p".
---
counsel.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index c0514ec..5c0390f 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1862,7 +1862,7 @@ the command."
(setq ivy--old-re
(ivy--regex string)))))
(counsel--async-command
- (format counsel-grep-base-command regex
+ (format counsel-grep-base-command (shell-quote-argument regex)
(shell-quote-argument counsel--git-grep-dir)))
nil)))