“fd-dired” is to run the fd https://github.com/sharkdp/fd command and output the result to dired mode, as similar as “find-dired”.
It is very useful tool if we want to operate specific files together which are not in same folder.
[2020-12-29 Tue] I found there is already an elisp package https://github.com/yqrashawn/fd-dired also named “fd-dired”, but the implementation is different.
- Input the fd comand arguments (or with “C-u” to specify the initial directory or use the current working directly)
- The result will be in dired mode, as same as “find-dired”
- Run from eshell command
- Run from
helm-find-files
Please intall https://github.com/sharkdp/fd firstly, and make sure the command “fd” in the system path.
Clone this git repo to “${user-emacs-directory}/packages/fd-dired”, and add folowing lines to Emacs config file:
(use-package fd-dired
:defer t
:ensure nil ; it is github package
;; If the path is relative, it is expanded within `user-emacs-directory'
:load-path "packages/fd-dired"
:init
(let ((pkg-name "fd-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 “fd-dired”, or with “C-u” to specify the directory.
- in eshell, run the command “fd”
- in helm-find-files, select the action “find dired by fd”