]> code.delx.au - gnu-emacs-elpa/commitdiff
counsel.el (counsel-locate): Add INTIAL-INPUT arg
authorOleh Krehel <ohwoeowho@gmail.com>
Sat, 14 Nov 2015 11:10:48 +0000 (12:10 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Sat, 14 Nov 2015 11:10:48 +0000 (12:10 +0100)
Fixes #289

counsel.el

index 8bfcbdcd594bad73767a6cabb0983f3428e92ccd..9b208c7b3a2da28a28b9bf1a00de4c2b5bee77ff 100644 (file)
@@ -646,10 +646,12 @@ Update the minibuffer with the amount of lines collected every
       (delete-process process))))
 
 ;;;###autoload
-(defun counsel-locate ()
-  "Call locate shell command."
+(defun counsel-locate (&optional initial-input)
+  "Call the \"locate\" shell command.
+INITIAL-INPUT can be given as the initial minibuffer input."
   (interactive)
   (ivy-read "Locate: " #'counsel-locate-function
+            :initial-input initial-input
             :dynamic-collection t
             :history 'counsel-locate-history
             :action (lambda (file)