[Top][All Lists]

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

[elpa] master df1dc78 019/272: counsel.el (counsel-find-file): Add initi

From: Oleh Krehel
Subject: [elpa] master df1dc78 019/272: counsel.el (counsel-find-file): Add initial-input
Date: Mon, 25 Apr 2016 10:13:14 +0000

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

    counsel.el (counsel-find-file): Add initial-input
    Re #336
 counsel.el |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/counsel.el b/counsel.el
index 227ad7f..89d3107 100644
--- a/counsel.el
+++ b/counsel.el
@@ -460,11 +460,13 @@ INITIAL-INPUT can be given as the initial minibuffer 
 (defvar counsel-find-file-map (make-sparse-keymap))
-(defun counsel-find-file ()
-  "Forward to `find-file'."
+(defun counsel-find-file (&optional initial-input)
+  "Forward to `find-file'.
+When INITIAL-INPUT is non-nil, use it in the minibuffer during completion."
   (ivy-read "Find file: " 'read-file-name-internal
             :matcher #'counsel--find-file-matcher
+            :initial-input initial-input
             (lambda (x)

reply via email to

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