branch: master commit e8f516ec7ef27aac83ab4f2abe88bdb2266be514 Author: justbur <jus...@burkett.cc> Commit: justbur <jus...@burkett.cc>
counsel.el (counsel-ag): Add transformer Also change command options to match git grep output. This is not critical but it makes the commands more consistent. --- counsel.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/counsel.el b/counsel.el index 128763d..81097b8 100644 --- a/counsel.el +++ b/counsel.el @@ -1265,15 +1265,16 @@ INITIAL-INPUT can be given as the initial minibuffer input." ;;* Grep ;;** `counsel-ag' -(defcustom counsel-ag-base-command "ag --vimgrep %s" +(defcustom counsel-ag-base-command "ag --nocolor --nogroup %s -- ." "Format string to use in `cousel-ag-function' to construct the command. %S will be replaced by the regex string. The default is -\"ag --vimgrep %S\"." +\"ag --nocolor --nogroup %s -- .\"." :type 'string :group 'ivy) (counsel-set-async-exit-code 'counsel-ag 1 "No matches found") (ivy-set-occur 'counsel-ag 'counsel-ag-occur) +(ivy-set-display-transformer 'counsel-ag 'counsel-git-grep-transformer) (defun counsel-ag-function (string) "Grep in the current directory for STRING."