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

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

[elpa] externals/ivy-hydra 64d18d1 002/395: counsel.el (counsel-ag): Res


From: Basil L. Contovounesios
Subject: [elpa] externals/ivy-hydra 64d18d1 002/395: counsel.el (counsel-ag): Respect case sensitivity settings
Date: Thu, 25 Feb 2021 08:31:18 -0500 (EST)

branch: externals/ivy-hydra
commit 64d18d1f9e7bd4c7b734057c9868347d1965036e
Author: Hong Xu <hong@topbug.net>
Commit: Oleh Krehel <ohwoeowho@gmail.com>

    counsel.el (counsel-ag): Respect case sensitivity settings
    
    Similar to counsel, ag defaults to smart case. Need to pass "-s" to
    enforce case-sensitive search.
    
    Fixes #2282
---
 counsel.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index 5192200..c6c7480 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2801,7 +2801,9 @@ NEEDLE is the search string."
             (regex (counsel--grep-regex search-term))
             (switches (concat (car command-args)
                               (counsel--ag-extra-switches regex)
-                              (and (ivy--case-fold-p string) " -i "))))
+                              (if (ivy--case-fold-p string)
+                                  " -i "
+                                " -s "))))
        (counsel--async-command (counsel--format-ag-command
                                 switches
                                 (shell-quote-argument regex)))



reply via email to

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