fd
使用起来比 find
更为轻松,默认就能忽略 .git
:
刚刚写一个简单的 Helm 界面:
(defun helm-fd ()
(interactive)
(helm :sources
(helm-build-async-source "fd"
:header-name (lambda (name)
(format "%s in [%s]" name (helm-default-directory)))
:candidates-process
(lambda ()
(let ((process-connection-type nil))
(let ((proc (apply #'start-process
"helm-fd" helm-buffer
"fd" (split-string helm-pattern))))
(set-process-sentinel proc #'ignore)
proc)))
:persistent-action 'helm-ff-kill-or-find-buffer-fname
:action 'helm-type-file-actions
:help-message 'helm-generic-file-help-message
:keymap helm-find-map
:candidate-number-limit 9999)
:buffer "*helm fd*"))