branch: elpa/helm commit 99c26b697397e2ce015b5a6ad7eb4abf43131313 Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Provide icons in fd --- helm-fd.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/helm-fd.el b/helm-fd.el index 6bfce178b7..0a08000b99 100644 --- a/helm-fd.el +++ b/helm-fd.el @@ -125,7 +125,14 @@ (defun helm-fd-fct (candidates _source) "The filtered-candidate-transformer function for helm-fd." (cl-loop for i in candidates - collect (ansi-color-apply i))) + for fname = (ansi-color-apply i) + if helm-ff-icon-mode collect + (let* ((abs (expand-file-name fname default-directory)) + (icon (if (file-directory-p abs) + (helm-x-icons-generic "file-directory") + (helm-x-icons-icon-for-file (helm-basename fname))))) + (cons (concat icon fname) fname)) + else collect fname)) (defun helm-fd-1 (directory) "Run fd shell command on DIRECTORY with helm interface."