Created
April 15, 2020 08:47
-
-
Save chuntaro/4269c58054a9110205d3ba00ed3d3e10 to your computer and use it in GitHub Desktop.
`vc-git-grep'はインタラクティブに実行するとファイル名等色々聞いてくるので、Enterだけで実行する為のラッパーコマンド
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; `vc-git-grep'はインタラクティブに実行するとファイル名等色々聞いてくるので | |
;; Enterだけで実行する為のラッパーコマンド | |
(defun vc-git-grep-quick (regexp &optional files dir) | |
(interactive | |
(progn | |
(grep-compute-defaults) | |
(let ((regexp (grep-read-regexp)) | |
(files (concat "*." (file-name-extension (buffer-file-name)))) | |
(dir ".")) | |
(list regexp files dir)))) | |
(vc-git-grep regexp files dir)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment