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

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

[elpa] master 00a1b02 22/90: counsel-git-grep should quote strings bette


From: Oleh Krehel
Subject: [elpa] master 00a1b02 22/90: counsel-git-grep should quote strings better
Date: Tue, 30 Jun 2015 07:28:10 +0000

branch: master
commit 00a1b02df0b1c4da6479ea6022568787bd21de6b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel-git-grep should quote strings better
    
    * counsel.el (counsel-git-grep-function):
    (counsel--gg-candidates): Update.
    
    Fixes an errror when the input has a " in it.
---
 counsel.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 57bad38..d1303ba 100644
--- a/counsel.el
+++ b/counsel.el
@@ -210,7 +210,7 @@
         (list ""
               (format "%d chars more" (- 3 (length ivy-text)))))
     (let* ((default-directory counsel--git-grep-dir)
-           (cmd (format "git --no-pager grep --full-name -n --no-color -i -e 
\"%s\""
+           (cmd (format "git --no-pager grep --full-name -n --no-color -i -e 
%S"
                         (ivy--regex string t)))
            res)
       (if (<= counsel--git-grep-count 20000)
@@ -428,7 +428,7 @@ The libraries are offered from `load-path'."
     (setq proc (start-process-shell-command
                 counsel-gg-process
                 counsel-gg-process
-                (format "git --no-pager grep --full-name -n --no-color -i -e 
\"%s\" | head -n 200"
+                (format "git --no-pager grep --full-name -n --no-color -i -e 
%S | head -n 200"
                         regex)))
     (set-process-sentinel
      proc



reply via email to

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