branch: elpa/projectile commit 2e4105c947610986e08980dcf1a891cf1f4303e1 Author: Álan Crístoffer <acristoff...@startmail.com> Commit: GitHub <nore...@github.com>
Add flag to fd to not print leading "./" (#1784) Fixes projectile-dir-files-alien on macOS. As I describe in #1783, the function `projectile-dir-files-alien` is not returning the same value in macOS as the function `projectile-dir-files-native`, because it is returning values with a leading "./". This PR fixes the `fd` command invocation adding the `--strip-cwd-prefix` to remove leading "./", and therefore fixing the issue reported in https://github.com/doomemacs/doomemacs/issues/6504. --- projectile.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projectile.el b/projectile.el index 19c5a6d2fa..af0b30235c 100644 --- a/projectile.el +++ b/projectile.el @@ -716,10 +716,10 @@ Set to nil to disable listing submodules contents." (cond ;; we prefer fd over find ((executable-find "fd") - "fd . -0 --type f --color=never") + "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") + "fdfind . -0 --type f --color=never --strip-cwd-prefix") ;; 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'"))