[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2ae7d74 058/167: Fix the count in user-specified counsel-g
From: |
Oleh Krehel |
Subject: |
[elpa] master 2ae7d74 058/167: Fix the count in user-specified counsel-git-grep |
Date: |
Tue, 08 Dec 2015 10:49:53 +0000 |
branch: master
commit 2ae7d74916f93ae11c9dddd9df0c47e4d6b62e77
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Fix the count in user-specified counsel-git-grep
* counsel.el (counsel--gg-count): Generate the count command from
`counsel-git-grep-cmd' by replacing "--full-name" with "-c".
Re #244
---
counsel.el | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/counsel.el b/counsel.el
index 25f1f44..402f55c 100644
--- a/counsel.el
+++ b/counsel.el
@@ -742,10 +742,17 @@ The libraries are offered from `load-path'."
"Quickly and asynchronously count the amount of git grep REGEX matches.
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}'"
- (replace-regexp-in-string
- "-" "\\\\-"
- (replace-regexp-in-string "'" "''" regex))))
+ (cmd
+ (concat
+ (format
+ (replace-regexp-in-string
+ "--full-name" "-c"
+ counsel-git-grep-cmd)
+ ;; "git grep -i -c '%s'"
+ (replace-regexp-in-string
+ "-" "\\\\-"
+ (replace-regexp-in-string "'" "''" regex)))
+ " | sed 's/.*:\\(.*\\)/\\1/g' | awk '{s+=$1} END {print s}'"))
(counsel-ggc-process " *counsel-gg-count*"))
(if no-async
(string-to-number (shell-command-to-string cmd))
- [elpa] master b6d476a 042/167: ivy.el (ivy--recompute-index): Fixup, (continued)
- [elpa] master b6d476a 042/167: ivy.el (ivy--recompute-index): Fixup, Oleh Krehel, 2015/12/08
- [elpa] master 83f704b 039/167: ivy-hydra.el (hydra-ivy): Make the docstring a rectangle, Oleh Krehel, 2015/12/08
- [elpa] master b06daca 040/167: ivy.el (ivy-virtual-abbreviate): New defcustom, Oleh Krehel, 2015/12/08
- [elpa] master c99956a 047/167: Fix window selection in counsel-locate, Oleh Krehel, 2015/12/08
- [elpa] master fa0d04c 038/167: Move setq ivy--index to ivy--recompute-index, Oleh Krehel, 2015/12/08
- [elpa] master e5105ef 054/167: Don't re-anchor to matching old candidate if flx is on, Oleh Krehel, 2015/12/08
- [elpa] master f4bd3a4 055/167: counsel.el (counsel-ag): Add initial-directory, Oleh Krehel, 2015/12/08
- [elpa] master 79924dc 051/167: swiper.el (swiper--re-builder): Fix "^a" -> "^" case, Oleh Krehel, 2015/12/08
- [elpa] master 2404db1 053/167: Add feedback for long-running async processes, Oleh Krehel, 2015/12/08
- [elpa] master d4d53d8 059/167: ivy.el (ivy-partial): Fix for fuzzy completion, Oleh Krehel, 2015/12/08
- [elpa] master 2ae7d74 058/167: Fix the count in user-specified counsel-git-grep,
Oleh Krehel <=
- [elpa] master fd19ab1 062/167: Add a test for the perfect match logic, Oleh Krehel, 2015/12/08
- [elpa] master 2386277 060/167: ivy.el (ivy-resume): Pass caller, Oleh Krehel, 2015/12/08
- [elpa] master 607fd1f 061/167: Bring back the lost perfect match logic, Oleh Krehel, 2015/12/08
- [elpa] master f0acebd 063/167: Fix Custom menus, Oleh Krehel, 2015/12/08
- [elpa] master f6dd9cd 066/167: ivy.el (ivy-alt-done): Fix up last commit, Oleh Krehel, 2015/12/08
- [elpa] master a11c978 068/167: ivy-immediate-done should use ivy--directory, Oleh Krehel, 2015/12/08
- [elpa] master d8673f8 078/167: ivy.el (ffap): Move require, Oleh Krehel, 2015/12/08
- [elpa] master 47f53b6 073/167: counsel.el (counsel--find-symbol): Resolve name clash better, Oleh Krehel, 2015/12/08
- [elpa] master dc84ba3 070/167: Rename and move the minibuffer faces, Oleh Krehel, 2015/12/08
- [elpa] master 183b803 071/167: Use a specific blending method for dark themes, Oleh Krehel, 2015/12/08