From 92b802f519490d7558d2597a0619fb11d0adb648 Mon Sep 17 00:00:00 2001 From: Oleh Krehel Date: Fri, 11 Mar 2016 17:01:13 +0100 Subject: [PATCH] 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 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 -- 2.39.2