Skip to content

Instantly share code, notes, and snippets.

@holtzermann17
Created February 22, 2021 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save holtzermann17/15ceb1f2181c149fc3ca8ed28240e1b1 to your computer and use it in GitHub Desktop.
Save holtzermann17/15ceb1f2181c149fc3ca8ed28240e1b1 to your computer and use it in GitHub Desktop.
Make helm-fd work with generic fd executable
diff --git a/helm-fd.el b/helm-fd.el
index 405e9270..6f8c7140 100644
--- a/helm-fd.el
+++ b/helm-fd.el
@@ -77,11 +77,11 @@
"Initialize fd process in an helm async source."
(let* (process-connection-type
(cmd (append helm-fd-switches (split-string helm-pattern " ")))
- (proc (apply #'start-process "fd" nil "fd" cmd))
+ (proc (apply #'start-process "fd" nil helm-fd-executable cmd))
(start-time (float-time))
(fd-version (replace-regexp-in-string
"\n" ""
- (shell-command-to-string "fd --version"))))
+ (shell-command-to-string (concat helm-fd-executable " --version")))))
(helm-log "Fd command:\nfd %s" (mapconcat 'identity cmd " "))
(helm-log "VERSION: %s" fd-version)
(prog1
@holtzermann17
Copy link
Author

On Ubuntu 20.04 the executable is called fdfind requiring this config:

(require 'helm-fd)
(setq helm-fd-executable "fdfind")

... alongside the patch above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment