branch: elpa/projectile commit b3e78217a80ff584fb4f570b801428eb33209ac6 Author: Bozhidar Batsov <bozhi...@batsov.dev> Commit: Bozhidar Batsov <bozhi...@batsov.dev>
Add a couple of comments --- projectile.el | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/projectile.el b/projectile.el index 235a6e2..8da986c 100644 --- a/projectile.el +++ b/projectile.el @@ -690,11 +690,16 @@ Set to nil to disable listing submodules contents." :type 'string) (defcustom projectile-generic-command - (cond ((executable-find "fd") - "fd . -0 --type f --color=never") - ((executable-find "fdfind") - "fdfind . -0 --type f --color=never") - (t "find . -type f | cut -c3- | tr '\\n' '\\0'")) + (cond + ;; we prefer fd over find + ((executable-find "fd") + "fd . -0 --type f --color=never") + ;; fd's executable is named fdfind is some Linux distros (e.g. Ubuntu) + ((executable-find "fdfind") + "fdfind . -0 --type f --color=never") + ;; 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'")) "Command used by projectile to get the files in a generic project." :group 'projectile :type 'string)