branch: master
commit 94c124dfb4e67838867e0cb598ebb83ee08a89f6
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ivy.el (ivy-done): Don't directory-expand glob filename
    
    * ivy.el (ivy-done): Don't directory-expand if there's a star in the
      file name.
    
    This change fixes the behavior of `rgrep`. It can't handle the case of
    e.g. /foo/bar/\*.el, but handles \*.el fine.
    
    Re #45
---
 ivy.el |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/ivy.el b/ivy.el
index 65b68d9..1353bf0 100644
--- a/ivy.el
+++ b/ivy.el
@@ -170,7 +170,9 @@ When non-nil, it should contain one %d.")
           (cond ((string= ivy-text "")
                  (if (equal ivy--current "./")
                      ivy--directory
-                   (expand-file-name ivy--current ivy--directory)))
+                   (if (string-match "\\*" ivy--current)
+                       ivy--current
+                     (expand-file-name ivy--current ivy--directory))))
                 ((zerop ivy--length)
                  (expand-file-name ivy-text ivy--directory))
                 (t

Reply via email to