| @@ -960,7 +960,17 @@ found, otherwise returns nil." | |||||
| '("di" . (lambda (options cmd args) | '("di" . (lambda (options cmd args) | ||||
| (git-command-exec options | (git-command-exec options | ||||
| "diff" | "diff" | ||||
| args))))) | |||||
| args)))) | |||||
| (add-to-list 'git-command-aliases-alist | |||||
| '("grep" . (lambda (options cmd args) | |||||
| (my-rgrep | |||||
| (concat | |||||
| "git " | |||||
| (git-command-construct-commandline | |||||
| `(,@options "--no-pager" | |||||
| "-c" "color.grep=false") | |||||
| cmd | |||||
| `("-nHe" ,@args)))))))) | |||||
| (setq git-command-use-emacsclient t) | (setq git-command-use-emacsclient t) | ||||
| (or git-command-prompt-file | (or git-command-prompt-file | ||||
| (setq git-command-prompt-file | (setq git-command-prompt-file | ||||
| @@ -2310,8 +2320,6 @@ Commands are searched from ALIST." | |||||
| ;; if alist is not given set default value | ;; if alist is not given set default value | ||||
| (my-rgrep-grep-command name my-rgrep-alist))) | (my-rgrep-grep-command name my-rgrep-alist))) | ||||
| (my-rgrep-grep-command "ag" nil) | |||||
| (defun my-rgrep (command-args) | (defun my-rgrep (command-args) | ||||
| "My recursive grep. Run COMMAND-ARGS." | "My recursive grep. Run COMMAND-ARGS." | ||||
| (interactive (let ((cmd (my-rgrep-grep-command my-rgrep-default | (interactive (let ((cmd (my-rgrep-grep-command my-rgrep-default | ||||
| @@ -2325,6 +2333,8 @@ Commands are searched from ALIST." | |||||
| (compilation-start command-args | (compilation-start command-args | ||||
| 'grep-mode)) | 'grep-mode)) | ||||
| (my-rgrep "git --no-pager grep -nH emacs emacs.el") | |||||
| ;; (defun my-rgrep-symbol-at-point (command-args) | ;; (defun my-rgrep-symbol-at-point (command-args) | ||||
| ;; "My recursive grep. Run COMMAND-ARGS." | ;; "My recursive grep. Run COMMAND-ARGS." | ||||
| ;; (interactive (list (read-shell-command "grep command: " | ;; (interactive (list (read-shell-command "grep command: " | ||||