branch: elpa/dirvish
commit 7926fec51b8d31a13f65b24b49fab814c1ac75c5
Author: Alex Lu <[email protected]>
Commit: Alex Lu <[email protected]>
fix(fd): pattern prompt
---
extensions/dirvish-fd.el => dirvish-fd.el | 3 ++-
dirvish.el | 3 ++-
extensions/dirvish-narrow.el | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/extensions/dirvish-fd.el b/dirvish-fd.el
similarity index 98%
rename from extensions/dirvish-fd.el
rename to dirvish-fd.el
index ca8eab6610..af2eb5ee0c 100644
--- a/extensions/dirvish-fd.el
+++ b/dirvish-fd.el
@@ -280,7 +280,8 @@ Raise an error if fd executable is not available."
(if (stringp pattern) (split-string pattern ",")
pattern)))
(ls-switches (or dired-actual-switches (dv-ls-switches dv)))
(key (file-name-nondirectory (directory-file-name dir)))
- (buf (get-buffer-create (concat key "🔍" pattern "🔍" (dv-id dv))))
+ (query (if (stringp pattern) pattern (mapconcat #'concat pattern
",")))
+ (buf (get-buffer-create (concat key "🔍" query "🔍" (dv-id dv))))
(fd (dirvish-prop :fd-info)) (re (or re (cadr fd)))
(switches (or (cddr fd) (split-string dirvish-fd-switches))))
(with-current-buffer buf
diff --git a/dirvish.el b/dirvish.el
index 9bd713e404..1564b367c9 100644
--- a/dirvish.el
+++ b/dirvish.el
@@ -1487,7 +1487,8 @@ With optional NOSELECT just find files but do not select
them."
((or re (and mc (length> (directory-files key nil nil t mc) (1-
mc))))
(setq fd (prog1 'dirvish-fd-noselect (require 'dirvish-fd nil t))
buffer (apply fd (list dv key (or re "")))
- key (concat key "🔍" (or re ""))))
+ re (if (stringp re) re (mapconcat #'concat re ","))
+ key (concat key "🔍" re)))
(new? (let (dired-buffers) ; disable reuse from `dired'
(setq buffer (apply fn (list dir-or-list flags))))))
(when (setq new? (null (alist-get key (dv-roots dv) nil nil #'equal)))
diff --git a/extensions/dirvish-narrow.el b/extensions/dirvish-narrow.el
index e0a438d3b6..be1bceb4da 100644
--- a/extensions/dirvish-narrow.el
+++ b/extensions/dirvish-narrow.el
@@ -119,7 +119,7 @@
with completion-regexp-list = rel
with completion-ignore-case = igc
for f in (all-completions "" files)
- do (insert (concat (gethash f files)))))))
+ do (insert (gethash f files))))))
(when (dv-curr-layout (dirvish-curr)) (force-mode-line-update t))))))
(dirvish-define-attribute narrow-match