Skip to content

Commit

Permalink
[Fix #1853] projectile-generic-command should use `projectile-fd-ex…
Browse files Browse the repository at this point in the history
…ecutable` to find the path for fd
  • Loading branch information
miles170 authored and bbatsov committed Oct 11, 2023
1 parent 0ad8262 commit f34d524
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
7 changes: 2 additions & 5 deletions projectile.el
Original file line number Diff line number Diff line change
Expand Up @@ -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'"))
Expand Down

0 comments on commit f34d524

Please sign in to comment.