[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 5a2e0fd 30/31: Allow for "/ssh:user@" as well as for "/ssh
From: |
Oleh Krehel |
Subject: |
[elpa] master 5a2e0fd 30/31: Allow for "/ssh:user@" as well as for "/ssh:" |
Date: |
Fri, 01 May 2015 14:29:06 +0000 |
branch: master
commit 5a2e0fd355fea83e3c172402b965a1aa826fcc0c
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Allow for "/ssh:user@" as well as for "/ssh:"
* ivy.el (ivy-alt-done): Update.
Re #59
---
ivy.el | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/ivy.el b/ivy.el
index d279535..a6d3c4f 100644
--- a/ivy.el
+++ b/ivy.el
@@ -250,18 +250,22 @@ When ARG is t, exit with current text, ignoring the
candidates."
ivy--current ivy--directory))))))
(ivy--cd dir)
(ivy--exhibit))
- ((string-match "\\`/\\([^/]+\\)[:@]\\'" ivy-text)
- (let ((full-method ivy-text)
- (method (match-string 1 ivy-text))
+ ((string-match "^/\\([^/]+?\\):\\(?:\\(.*\\)@\\)?" ivy-text)
+ (let ((method (match-string 1 ivy-text))
+ (user (match-string 2 ivy-text))
res)
(dolist (x (tramp-get-completion-function method))
(setq res (append res (funcall (car x) (cadr x)))))
(setq res (delq nil res))
+ (when user
+ (dolist (x res)
+ (setcar x user)))
+ (setq res (cl-delete-duplicates res :test 'equal))
(let ((host (ivy-read "Find File: "
(mapcar #'ivy-build-tramp-name res))))
(when host
(setq ivy--directory "/")
- (ivy--cd (concat full-method host ":"))))))
+ (ivy--cd (concat "/" method ":" host ":"))))))
(t
(ivy-done))))))
- [elpa] master ae2fd1a 21/31: Improve hidden buffer completion further, (continued)
- [elpa] master ae2fd1a 21/31: Improve hidden buffer completion further, Oleh Krehel, 2015/05/01
- [elpa] master 5dc26fb 20/31: Improve the completion of hidden buffers, Oleh Krehel, 2015/05/01
- [elpa] master 1332b19 22/31: ivy.el (ivy--exhibit): Fixup last commit, Oleh Krehel, 2015/05/01
- [elpa] master 6b2e95a 24/31: Add gamma-correction to alpha-blending, Oleh Krehel, 2015/05/01
- [elpa] master a868705 23/31: colir.el: Add two additional blend algorithms, Oleh Krehel, 2015/05/01
- [elpa] master 7bd6003 25/31: Update and improve faces, Oleh Krehel, 2015/05/01
- [elpa] master 94b6a83 26/31: Don't error on bad regex, Oleh Krehel, 2015/05/01
- [elpa] master 0dd6c5a 27/31: ivy.el (ivy--regex): Fixup, Oleh Krehel, 2015/05/01
- [elpa] master fc84e0d 28/31: ivy.el (ivy-read): Reset `ivy-text' earlier, Oleh Krehel, 2015/05/01
- [elpa] master 5a1bd78 29/31: Improve TRAMP completion for ivy-mode, Oleh Krehel, 2015/05/01
- [elpa] master 5a2e0fd 30/31: Allow for "/ssh:user@" as well as for "/ssh:",
Oleh Krehel <=
- [elpa] master 4137447 31/31: Merge commit '5a2e0fd355fea83e3c172402b965a1aa826fcc0c' from swiper, Oleh Krehel, 2015/05/01