]> git.eshelyaron.com Git - emacs.git/commitdiff
Make Dired honor `insert-directory-programĀ“ with globs
authorStefan Kangas <stefankangas@gmail.com>
Mon, 23 Oct 2023 11:57:28 +0000 (13:57 +0200)
committerStefan Kangas <stefankangas@gmail.com>
Mon, 23 Oct 2023 11:57:28 +0000 (13:57 +0200)
Starting with commit 6f6639d6ed6c6314b2643f6c22498fc2e23d34c7
(Bug#27631), Dired stopped respecting the value of
'insert-directory-program' when using directory wildcards/globs.

* lisp/dired.el (dired-insert-directory): Honor the value of
'insert-directory-program' when using directory wildcards.

lisp/dired.el

index e5110e76a7676836163464677f61bf219af9aafb..f81e49a6b00015e98cb84df1c6763cd49a0478db 100644 (file)
@@ -1664,7 +1664,9 @@ see `dired-use-ls-dired' for more details.")
              (when (file-remote-p dir)
                (setq switches (string-replace "--dired" "" switches)))
              (let* ((default-directory (car dir-wildcard))
-                    (script (format "ls %s %s" switches (cdr dir-wildcard)))
+                    (script (format "%s %s %s"
+                                    insert-directory-program
+                                    switches (cdr dir-wildcard)))
                     (remotep (file-remote-p dir))
                     (sh (or (and remotep "/bin/sh")
                             (executable-find shell-file-name)