]> code.delx.au - gnu-emacs-elpa/commitdiff
(no commit message)
authorJosh Marchán <sykopomp@sykosomatic.org>
Sun, 25 Sep 2011 16:19:58 +0000 (09:19 -0700)
committerJosh Marchán <sykopomp@sykosomatic.org>
Sun, 25 Sep 2011 16:19:58 +0000 (09:19 -0700)
gistfile1.el [new file with mode: 0644]

diff --git a/gistfile1.el b/gistfile1.el
new file mode 100644 (file)
index 0000000..66117bd
--- /dev/null
@@ -0,0 +1,5 @@
+(defun git-grep (regexp)
+  (interactive "sSearch in git repo: ")
+  (grep (format "GIT_PAGER='' git grep -nH --no-color -i \"%s\" -- $(git rev-parse --show-toplevel)" regexp)))
+
+(global-set-key (kbd "C-x ?") 'git-grep)