“ripgrep-dired” is Emacs package, which provide 2 tools related to rg https://github.com/BurntSushi/ripgrep:
- The command rg-dired is used to find the matched file list by rg, and output the result to dired mode, as similar as “find-grep-dired”.
- The command rg-grep is used to do grep on files, and handle the result by using the way that used by built command “rgrep”.
- Input regular grep for search
- The result will be in dired mode, as same as “find-grep-dired”
- Run from
helm-find-files
- Please intall https://github.com/BurntSushi/ripgrep firstly, and make sure the command “rg” in the system path.
- Intall Emacs package “pcre2el”
Clone this git repo to “${user-emacs-directory}/packages/ripgrep-dired”, and add folowing lines to Emacs config file:
(use-package ripgrep-dired
:defer t
:ensure nil ; it is github package
;; If the path is relative, it is expanded within `user-emacs-directory'
:load-path "packages/ripgrep-dired"
:init
(let ((pkg-name "ripgrep-dired"))
(ignore-errors
(package-generate-autoloads pkg-name
(expand-file-name (concat "packages/" pkg-name)
user-emacs-directory)))
(load (concat pkg-name "-autoloads.el")))
)
- in “M-x”, run the command “rg-dired”, or “rg-grep”.
- in eshell, run the command “rg” for “rg-grep”
- in helm-find-files, select the action “find dired by rg”, or “grep by rg”