[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0c5f68c 183/272: counsel.el (counsel-pt): Add
From: |
Oleh Krehel |
Subject: |
[elpa] master 0c5f68c 183/272: counsel.el (counsel-pt): Add |
Date: |
Mon, 25 Apr 2016 10:13:24 +0000 |
branch: master
commit 0c5f68cc6971de8ccdc9ff6107c4142c78dbfbfc
Author: justbur <address@hidden>
Commit: justbur <address@hidden>
counsel.el (counsel-pt): Add
counsel.el (counsel-pt-base-command): Used in place of
counsel-ag-base-command for counsel-pt.
---
counsel.el | 24 ++++++++++++++++++++++--
1 file changed, 22 insertions(+), 2 deletions(-)
diff --git a/counsel.el b/counsel.el
index 81097b8..3936597 100644
--- a/counsel.el
+++ b/counsel.el
@@ -1295,9 +1295,12 @@ INITIAL-INPUT can be given as the initial minibuffer
input."
(interactive
(list nil
(when current-prefix-arg
- (read-directory-name "ag in directory: "))))
+ (read-directory-name (concat
+ (car (split-string counsel-ag-base-command))
+ " in directory: ")))))
(setq counsel--git-grep-dir (or initial-directory default-directory))
- (ivy-read (funcall counsel-prompt-function "ag")
+ (ivy-read (funcall counsel-prompt-function
+ (car (split-string counsel-ag-base-command)))
'counsel-ag-function
:initial-input initial-input
:dynamic-collection t
@@ -1329,6 +1332,23 @@ INITIAL-INPUT can be given as the initial minibuffer
input."
(lambda (cand) (concat "./" cand))
cands))))
+;;** `counsel-pt'
+(defcustom counsel-pt-base-command "pt --nocolor --nogroup %s -- ."
+ "Used to in place of `counsel-ag-base-command' to search with
+pt using `counsel-ag'."
+ :type 'string
+ :group 'ivy)
+
+;;;###autoload
+(defun counsel-pt (&optional initial-input initial-directory)
+ "Grep for a string in the current directory using pt.
+This uses `counsel-ag' with `counsel-pt-base-command' replacing
+`counsel-ag-base-command'. INITIAL-INPUT can be given as the
+initial minibuffer input."
+ (interactive)
+ (let ((counsel-ag-base-command counsel-pt-base-command))
+ (call-interactively 'counsel-ag)))
+
;;** `counsel-grep'
(defun counsel-grep-function (string)
"Grep in the current directory for STRING."
- [elpa] master d425392 178/272: Correctly expand the file name at point, (continued)
- [elpa] master d425392 178/272: Correctly expand the file name at point, Oleh Krehel, 2016/04/25
- [elpa] master 8201f36 224/272: ivy.el (ivy-occur-revert-buffer): Improve for counsel-git-grep, Oleh Krehel, 2016/04/25
- [elpa] master 20f11b7 159/272: New command ivy-occur-revert-buffer bound to "g", Oleh Krehel, 2016/04/25
- [elpa] master d8da9c4 188/272: counsel.el (counsel-mode): Allow use of describe-prefix-bindings, Oleh Krehel, 2016/04/25
- [elpa] master ab795d0 265/272: Don't highlight that match in the file name part, Oleh Krehel, 2016/04/25
- [elpa] master 255457a 177/272: Fixed counsel-list-processes-action-switch to use correct buffer., Oleh Krehel, 2016/04/25
- [elpa] master 48b5638 129/272: ivy.el (ivy-next-history-element): Don't add symbol bounds for file names, Oleh Krehel, 2016/04/25
- [elpa] master 41dfae6 194/272: ivy.el (ivy--format-function-generic): Fix doc, Oleh Krehel, 2016/04/25
- [elpa] master f0de338 198/272: ivy.el (ivy--directory-done): Fix when ivy-text is a dir, Oleh Krehel, 2016/04/25
- [elpa] master 67224c0 171/272: counsel.el (counsel-prompt-function): New defcustom, Oleh Krehel, 2016/04/25
- [elpa] master 0c5f68c 183/272: counsel.el (counsel-pt): Add,
Oleh Krehel <=
- [elpa] master 692002d 184/272: counsel.el (counsel-pt): Remove unused args, Oleh Krehel, 2016/04/25
- [elpa] master 0bad922 083/272: Provide the :caller in most calls to ivy-read, Oleh Krehel, 2016/04/25
- [elpa] master dabd1f8 205/272: ivy.el (ivy-avy): Make "C-g" cancel gracefully, Oleh Krehel, 2016/04/25
- [elpa] master e8f2064 117/272: Rename counsel-symbol-at-point to ivy-thing-at-point, Oleh Krehel, 2016/04/25
- [elpa] master 8d04638 202/272: counsel.el: Fix breakage due to helm-rhythmbox, Oleh Krehel, 2016/04/25
- [elpa] master 6ae91f7 213/272: Make ivy-set-sources work also for sync completion, Oleh Krehel, 2016/04/25
- [elpa] master f7c7114 037/272: ivy-test.el (ivy--regex-ignore-order): New test, Oleh Krehel, 2016/04/25
- [elpa] master 1088078 266/272: When selecting a non-existing key in an alist, return that key, Oleh Krehel, 2016/04/25
- [elpa] master 341b5a2 229/272: counsel-grep should pick candidates closest to point, Oleh Krehel, 2016/04/25
- [elpa] master d71b5c5 081/272: swiper.el (swiper--action): Update regexp-search-ring, Oleh Krehel, 2016/04/25