[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra c6b60d3 337/395: counsel.el (counsel-ag): Pro
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra c6b60d3 337/395: counsel.el (counsel-ag): Prompt for args on a double universal-argument |
Date: |
Thu, 25 Feb 2021 08:32:33 -0500 (EST) |
branch: externals/ivy-hydra
commit c6b60d34ac37bf4d91a25f16d22e528f85e06938
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
counsel.el (counsel-ag): Prompt for args on a double universal-argument
* counsel.el (counsel-ag): Clarify the docstring.
Fixes #2636
---
counsel.el | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
diff --git a/counsel.el b/counsel.el
index 1a81caf..0b23abc 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2964,24 +2964,33 @@ NEEDLE is the search string."
;;;###autoload
(cl-defun counsel-ag (&optional initial-input initial-directory extra-ag-args
ag-prompt
&key caller)
- "Grep for a string in the current directory using ag.
+ "Grep for a string in a root directory using ag.
+
+By default, the root directory is the first directory containing a .git
subdirectory.
+
INITIAL-INPUT can be given as the initial minibuffer input.
INITIAL-DIRECTORY, if non-nil, is used as the root directory for search.
-EXTRA-AG-ARGS string, if non-nil, is appended to `counsel-ag-base-command'.
+EXTRA-AG-ARGS, if non-nil, is appended to `counsel-ag-base-command'.
AG-PROMPT, if non-nil, is passed as `ivy-read' prompt argument.
-CALLER is passed to `ivy-read'."
+CALLER is passed to `ivy-read'.
+
+With a `\\[universal-argument]' prefix argument, prompt for INITIAL-DIRECTORY.
+With a `\\[universal-argument] \\[universal-argument]' prefix argument, \
+prompt additionally for EXTRA-AG-ARGS."
(interactive)
(setq counsel-ag-command counsel-ag-base-command)
(setq counsel--regex-look-around counsel--grep-tool-look-around)
(counsel-require-program counsel-ag-command)
(let ((prog-name (car (if (listp counsel-ag-command) counsel-ag-command
- (split-string counsel-ag-command)))))
- (when current-prefix-arg
+ (split-string counsel-ag-command))))
+ (arg (prefix-numeric-value current-prefix-arg)))
+ (when (>= arg 4)
(setq initial-directory
(or initial-directory
(counsel-read-directory-name (concat
prog-name
- " in directory: "))))
+ " in directory: ")))))
+ (when (>= arg 16)
(setq extra-ag-args
(or extra-ag-args
(read-from-minibuffer (format "%s args: " prog-name)))))
- [elpa] externals/ivy-hydra 3b1737c 361/395: * counsel.el (counsel-linux-app): Improve prompt., (continued)
- [elpa] externals/ivy-hydra 3b1737c 361/395: * counsel.el (counsel-linux-app): Improve prompt., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 1723799 368/395: Fix M-o 'Wrong type argument: characterp' error, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra fc2801f 367/395: `counsel-find-file': open file in foreground, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ae9b121 366/395: Avoid face blending errors when loading swiper.el, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 796220b 357/395: ivy.el (ivy-alt-done): Extend to programmed completion, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 911a360 365/395: Consistently use modern face spec syntax, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 74f411d 355/395: Remove Emacs 28 workaround in counsel-descbinds, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 778d8bf 363/395: * counsel.el (counsel-org-files): Simplify regexp., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ab36ccb 364/395: * counsel.el (counsel-org-files): Fix regexp., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b65e401 351/395: counsel.el (counsel-file-jump-from-find): Add and bind to "`", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra c6b60d3 337/395: counsel.el (counsel-ag): Prompt for args on a double universal-argument,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra d18ec97 338/395: counsel.el (compile-command): better handle our metadata, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d321048 358/395: ivy.el (ivy-add-prompt-count): Simplify, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 96b433d 369/395: Handle Windows directory separator in ivy-occur, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra e43141d 373/395: ivy.el: Make sure swiper-isearch works with "M-r", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b7cb680 375/395: Remove unnecessary variable declarations, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra cbce9ce 380/395: * ivy.el (ivy-rotate-sort): Also look up t., Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 25439e2 381/395: Don't modify user options without ivy-configure, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8f2abd3 379/395: Switch between counsel-file-jump/counsel-find-file, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8fb825d 382/395: Fix counsel-read-setq-expression, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 0965e23 386/395: Mention ignore alongside ivy-on-del-error-function, Basil L. Contovounesios, 2021/02/25