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

    counsel.el (counsel-ag): Add dir prompt for "C-u"
    
    Fixes #429
---
 counsel.el |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/counsel.el b/counsel.el
index 899e5e0..9a0b95a 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1289,7 +1289,10 @@ command. %S will be replaced by the regex string. The 
default is
 (defun counsel-ag (&optional initial-input initial-directory)
   "Grep for a string in the current directory using ag.
 INITIAL-INPUT can be given as the initial minibuffer input."
-  (interactive)
+  (interactive
+   (list nil
+         (when current-prefix-arg
+           (read-directory-name "ag in directory: "))))
   (setq counsel--git-grep-dir (or initial-directory default-directory))
   (ivy-read (funcall counsel-prompt-function "ag")
             'counsel-ag-function

Reply via email to