[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 5f1d9ce 179/395: counsel.el (counsel--grep-sm
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 5f1d9ce 179/395: counsel.el (counsel--grep-smart-case-flag): Extract |
Date: |
Thu, 25 Feb 2021 08:31:58 -0500 (EST) |
branch: externals/ivy-hydra
commit 5f1d9ce04599c52818244c2cb8cb066a601610b8
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
counsel.el (counsel--grep-smart-case-flag): Extract
Fixes #2392
---
counsel.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/counsel.el b/counsel.el
index d556d6c..57ec13c 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2958,6 +2958,13 @@ Works for `counsel-git-grep', `counsel-ag', etc."
(ivy-quit-and-run
(funcall (ivy-state-caller ivy-last) input new-dir))))
+(defun counsel--grep-smart-case-flag ()
+ (if (ivy--case-fold-p ivy-text)
+ " -i "
+ (if (string-match-p "\\`pt" counsel-ag-base-command)
+ " -S "
+ " -s ")))
+
(defun counsel-grep-like-occur (cmd-template)
(unless (eq major-mode 'ivy-occur-grep-mode)
(ivy-occur-grep-mode)
@@ -2972,9 +2979,7 @@ Works for `counsel-git-grep', `counsel-ag', etc."
(regex (counsel--grep-regex (cdr command-args)))
(switches (concat (car command-args)
(counsel--ag-extra-switches regex)
- (if (ivy--case-fold-p ivy-text)
- " -i "
- " -s "))))
+ (counsel--grep-smart-case-flag))))
(format cmd-template
(concat
switches
- [elpa] externals/ivy-hydra ba4c1d5 151/395: swiper.el (swiper-C-s): New command bound to "C-s" for swiper, (continued)
- [elpa] externals/ivy-hydra ba4c1d5 151/395: swiper.el (swiper-C-s): New command bound to "C-s" for swiper, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 83873c7 152/395: ivy.el (ivy--dynamic-collection-cands): Accept alist from dynamic-collection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra db45501 153/395: Add counsel-find-file action: find-file-literally, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b83d271 171/395: ivy.el (ivy-backward-kill-word): Actually kill-word, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 4b4f7c8 163/395: swiper.el (swiper-occur): Works with marked candidates, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 3915890 172/395: ivy.el (ivy-format-function-line): Add doc about :extend t, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ea1e4f3 165/395: ivy.el (ivy-avy): Add a warning for M-x, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 40b4705 160/395: ivy.el (ivy--dynamic-collection-cands): Handle the case of coll 0, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c782b48 161/395: ivy.el (ivy-read-action-by-key): Fix for Emacs27, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1933f6d 178/395: ivy.el (ivy-resume): Don't re-calculate for :dynamic-collection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 5f1d9ce 179/395: counsel.el (counsel--grep-smart-case-flag): Extract,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 73c9773 180/395: Fix ripgrep pcre2 feature detection, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 640b83d 182/395: counsel.el (counsel-rg-base-command): Fix missing space, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d5225a1 187/395: swiper.el (swiper--isearch-unwind): Extract, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 93be68a 183/395: swiper.el (swiper-isearch-format-function): Fix for ivy-resume, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 25b6321 208/395: Fix recent counsel-recentf-candidates thinko, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 47ec37b 203/395: ivy.el: Fix some string predicates, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1883499 217/395: ivy.el (ivy-auto-shrink-minibuffer-alist): Extend from ivy-auto-shrink-minibuffer, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c5517fc 228/395: ivy.el: Trim grep line numbers for "M-o w" and "M-o i", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f2852fc 207/395: Clean up compatibility code, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1d25cdd 209/395: Revert ".dir-locals.el: Simplify outline-regexp", Basil L. Contovounesios, 2021/02/25