aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Liu <miles@bung.cc>2023-10-11 14:56:34 +0800
committerBozhidar Batsov <bozhidar@batsov.dev>2023-10-11 09:44:41 +0200
commitf34d5245c0afee5ffe48ae9966892edb744d339e (patch)
tree4b7102dee28d3e19e20b084e46efd6b794667695
parent0ad826213a18afcba6d8f412fdb462850b29239c (diff)
[Fix #1853] `projectile-generic-command` should use `projectile-fd-executable` to find the path for fd
-rw-r--r--CHANGELOG.md1
-rw-r--r--projectile.el7
2 files changed, 3 insertions, 5 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 170a36f..e839a32 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,7 @@
* Fix `fd` inserting color control sequences when used over tramp.
* [#1835](https://github.com/bbatsov/projectile/issues/1835): Reopening existing vterm buffer in other window
+* [#1865](https://github.com/bbatsov/projectile/pull/1865): `projectile-generic-command` should use `projectile-fd-executable` to find the path for fd.
## 2.7.0 (2022-11-22)
diff --git a/projectile.el b/projectile.el
index f7d4363..8db1b2a 100644
--- a/projectile.el
+++ b/projectile.el
@@ -756,11 +756,8 @@ Set to nil to disable listing submodules contents."
(cond
;; we prefer fd over find
;; note that --strip-cwd-prefix is only available in version 8.3.0+
- ((executable-find "fd")
- "fd . -0 --type f --color=never --strip-cwd-prefix")
- ;; fd's executable is named fdfind is some Linux distros (e.g. Ubuntu)
- ((executable-find "fdfind")
- "fdfind . -0 --type f --color=never --strip-cwd-prefix")
+ (projectile-fd-executable
+ (format "%s . -0 --type f --color=never --strip-cwd-prefix" projectile-fd-executable))
;; with find we have to be careful to strip the ./ from the paths
;; see https://stackoverflow.com/questions/2596462/how-to-strip-leading-in-unix-find
(t "find . -type f | cut -c3- | tr '\\n' '\\0'"))