branch: master
commit 36471155b1010321f1805b65f1a4af2f5a41203c
Author: jixiuf <[email protected]>
Commit: Oleh Krehel <[email protected]>

    Add optional param:initial-input for counsel-git
    
    Fixes #1074
---
 counsel.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index 85f7166..a101d1b 100644
--- a/counsel.el
+++ b/counsel.el
@@ -988,7 +988,7 @@ BUFFER defaults to the current one."
    ("x" counsel-find-file-extern "open externally")))
 
 ;;;###autoload
-(defun counsel-git ()
+(defun counsel-git (&optional initial-input)
   "Find file in the current Git repository."
   (interactive)
   (setq counsel--git-dir (locate-dominating-file
@@ -1004,6 +1004,7 @@ BUFFER defaults to the current one."
                    "\n"
                    t)))
       (ivy-read "Find file" cands
+                :initial-input initial-input
                 :action #'counsel-git-action
                 :caller 'counsel-git))))
 

Reply via email to