branch: externals/ivy-hydra
commit 7fd0662c49b163b3733e84c2ee3977898c0beaf4
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    counsel.el (counsel-grep-like-occur): Fix for marked files in dired
    
    Re #2552
---
 counsel.el | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/counsel.el b/counsel.el
index cc86770..e63ad83 100644
--- a/counsel.el
+++ b/counsel.el
@@ -3143,10 +3143,9 @@ Works for `counsel-git-grep', `counsel-ag', etc."
                   (counsel--format
                    cmd-template
                    (mapconcat #'shell-quote-argument all-args " "))
-                (cl-assert (equal (last cmd-template) '("%s")))
-                (append
-                 (butlast cmd-template)
-                 all-args)))))
+                (cl-mapcan
+                 (lambda (x) (if (string= x "%s") all-args (list x)))
+                 (copy-sequence cmd-template))))))
          (cands (counsel--split-string
                  (if (stringp cmd-template)
                      (shell-command-to-string cmd)

Reply via email to