branch: master
commit df1dc78c3a0659862a7d263d8c438a12080d038d
Author: Oleh Krehel <ohwoeo...@gmail.com>
Commit: Oleh Krehel <ohwoeo...@gmail.com>

    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 
input."
 (defvar counsel-find-file-map (make-sparse-keymap))
 
 ;;;###autoload
-(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."
   (interactive)
   (ivy-read "Find file: " 'read-file-name-internal
             :matcher #'counsel--find-file-matcher
+            :initial-input initial-input
             :action
             (lambda (x)
               (with-ivy-window

Reply via email to