* lisp/simple.el (minibuffer-default-add-shell-commands): Fix old bug.

Don't treat the first element of the list of commands as a file name.
This commit is contained in:
Juri Linkov 2025-11-09 19:49:29 +02:00
parent 79e1226238
commit 1f32ff090a

View file

@ -4317,8 +4317,7 @@ stdout will be intermixed in the output stream.")
This function is used to add all related commands retrieved by
`shell-command-guess' to the end of the list of defaults just
after the default value."
(let* ((filename (if (listp minibuffer-default)
(car minibuffer-default)
(let* ((filename (unless (consp minibuffer-default)
minibuffer-default))
(commands (and filename (require 'dired-aux)
(shell-command-guess (list filename)))))