branch: externals/agitate commit 6604612c32af5d686515c6a4f6d0771cbfa17839 Author: Protesilaos Stavrou <i...@protesilaos.com> Commit: Protesilaos Stavrou <i...@protesilaos.com>
Add agitate-git-grep command --- agitate.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/agitate.el b/agitate.el index 59c79d29cf..c4c83cc432 100644 --- a/agitate.el +++ b/agitate.el @@ -77,5 +77,15 @@ file extension. Else omit it." "Substitute for `vc-git-push' with the same meaning for PROMPT." (vc-git--pushpull "push" prompt (unless prompt `(,(agitate--vc-git-prompt-remote))))) +;;;###autoload +(defun agitate-git-grep (regexp) + "Run `git-grep(1)' for REGEXP in `vc-root-dir'. +This is a simple wrapper around `vc-git-grep' to streamline the +basic task of searching for a regexp in the current Git +repository. Use the original `vc-git-grep' for its other +features." + (interactive (list (read-regexp "git-grep: " nil 'vc-git-history))) + (vc-git-grep regexp "*" (vc-root-dir))) + (provide 'agitate) ;;; agitate.el ends here