From 76f309ceb5f223e21638afe9f831fb348f810e99 Mon Sep 17 00:00:00 2001 From: Liam Hupfer Date: Mon, 25 Sep 2023 22:15:40 -0500 Subject: [PATCH] tweak(vertico): show entire path for fd results Currently, fd does not expose a way to match against only the path components beneath the target path. When --full-path is specified, the pattern matches against all components. For example, executing consult-fd from /home/hlissner/.emacs.d with `home` as the query would match every file (not excluded by other arguments) under .emacs.d. Despite this --full-path behavior, fd still outputs relative paths, so the user cannot even determine why some candidates are returned. Until there is a method to match only against subdirectories, use --absolute-path to at least to show the user why all matches are occurring. Ref: https://github.com/sharkdp/fd/issues/839 --- modules/completion/vertico/config.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/completion/vertico/config.el b/modules/completion/vertico/config.el index 8e7a9f0a8..e92b9ec47 100644 --- a/modules/completion/vertico/config.el +++ b/modules/completion/vertico/config.el @@ -149,7 +149,10 @@ orderless." (if doom-projectile-fd-binary (setq consult-fd-args '(doom-projectile-fd-binary - "--full-path --color=never -H -E .git" + "--color=never" + ;; https://github.com/sharkdp/fd/issues/839 + "--full-path --absolute-path" + "--hidden --exclude .git" (when IS-WINDOWS "--path-separator=/")))) (consult-customize