emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 45b54e3 015/167: counsel.el (counsel--gg-count): Fix for "


From: Oleh Krehel
Subject: [elpa] master 45b54e3 015/167: counsel.el (counsel--gg-count): Fix for "'" in query
Date: Tue, 08 Dec 2015 10:49:37 +0000

branch: master
commit 45b54e37cb0952cbafbd80fb6b0ccf4f2538c5da
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    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))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]