branch: master
commit 45b54e37cb0952cbafbd80fb6b0ccf4f2538c5da
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>
counsel.el (counsel--gg-count): Fix for "'" in query
Since "'" is used for quoting in bash, it needs to be replaced with "''" .
---
counsel.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/counsel.el b/counsel.el
index 87d0eb7..ce23179 100644
--- a/counsel.el
+++ b/counsel.el
@@ -717,7 +717,7 @@ The libraries are offered from `load-path'."
When NO-ASYNC is non-nil, do it synchronously."
(let ((default-directory counsel--git-grep-dir)
(cmd (format "git grep -i -c '%s' | sed 's/.*:\\(.*\\)/\\1/g' | awk
'{s+=$1} END {print s}'"
- regex))
+ (replace-regexp-in-string "'" "''" regex)))
(counsel-ggc-process " *counsel-gg-count*"))
(if no-async
(string-to-number (shell-command-to-string cmd))