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

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

[elpa] master 8f87f74 178/348: counsel.el (counsel-git-grep): Update for


From: Oleh Krehel
Subject: [elpa] master 8f87f74 178/348: counsel.el (counsel-git-grep): Update for Windows
Date: Sat, 8 Apr 2017 11:03:50 -0400 (EDT)

branch: master
commit 8f87f740e211a47cdcffa1b4fe086ba5240472fb
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    counsel.el (counsel-git-grep): Update for Windows
    
    Don't count on Windows having awk and sed.
    
    This makes it possible to use `counsel-git-grep' even without Cygwin,
    just having `git' from the "Git for Windows" build in the PATH is
    enough.
    
    Of course, it won't work well for huge repositories.
---
 counsel.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index 1708753..fda6d0e 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1030,7 +1030,10 @@ INITIAL-INPUT can be given as the initial minibuffer 
input."
     (if (null counsel--git-grep-dir)
         (error "Not in a git repository")
       (unless proj
-        (setq counsel--git-grep-count (counsel--gg-count "" t)))
+        (setq counsel--git-grep-count
+              (if (eq system-type 'windows-nt)
+                  0
+                (counsel--gg-count "" t))))
       (ivy-read "git grep" (if proj
                                'counsel-git-grep-proj-function
                              'counsel-git-grep-function)



reply via email to

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