[Top][All Lists]

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

[elpa] master b154260 097/399: counsel.el (counsel-grep): Fix TRAMP prob

From: Oleh Krehel
Subject: [elpa] master b154260 097/399: counsel.el (counsel-grep): Fix TRAMP problems
Date: Sat, 20 Jul 2019 14:56:56 -0400 (EDT)

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

    counsel.el (counsel-grep): Fix TRAMP problems
    Re #1978
 counsel.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 6605d90..bcf633c 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2855,8 +2855,11 @@ When non-nil, INITIAL-INPUT is the initial search 
   (setq counsel-grep-last-line nil)
   (setq counsel-grep-command
         (format counsel-grep-base-command
-                "%s" (shell-quote-argument buffer-file-name)))
-  (let ((init-point (point))
+                "%s" (shell-quote-argument
+                      (file-name-nondirectory
+                       buffer-file-name))))
+  (let ((default-directory (file-name-directory buffer-file-name))
+        (init-point (point))
          (setq res (ivy-read "grep: " 'counsel-grep-function

reply via email to

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