From: Oleh Krehel Date: Fri, 11 Mar 2016 16:01:13 +0000 (+0100) Subject: counsel.el (counsel-ag): Add dir prompt for "C-u" X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/92b802f519490d7558d2597a0619fb11d0adb648 counsel.el (counsel-ag): Add dir prompt for "C-u" Fixes #429 --- diff --git a/counsel.el b/counsel.el index 899e5e0a0..9a0b95a87 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