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

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

[elpa] master b948987 095/167: Input "/sudo::" goes to current directory


From: Oleh Krehel
Subject: [elpa] master b948987 095/167: Input "/sudo::" goes to current directory instead of root's home
Date: Tue, 08 Dec 2015 10:50:14 +0000

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

    Input "/sudo::" goes to current directory instead of root's home
    
    * ivy.el (ivy-alt-done): Update.
    
    Re #283
---
 ivy.el |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/ivy.el b/ivy.el
index 2457f3d..b7a238a 100644
--- a/ivy.el
+++ b/ivy.el
@@ -384,6 +384,11 @@ When ARG is t, exit with current text, ignoring the 
candidates."
     (cond (arg
            (ivy-immediate-done))
           ((and ivy--directory
+                (equal ivy-text "/sudo::"))
+           (setq dir (concat ivy-text ivy--directory))
+           (ivy--cd dir)
+           (ivy--exhibit))
+          ((and ivy--directory
                 (or
                  (and
                   (not (equal ivy-text ""))



reply via email to

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