Directly complain when not file are available in custom dired view

Otherwise, a rather confusing error message is displayed about not being able to
find a file called "Command output" in the current directory.
This commit is contained in:
Daniel - 2021-08-22 09:32:05 +02:00
parent 106f286285
commit e14a7248b0
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 3 additions and 1 deletions

View File

@ -358,7 +358,9 @@ output, separated by \\n, when called with
(file-symlink-p entry))))
(split-string (shell-command-to-string command)
"\n"))))
(dired (cons "Command output" list-of-files))))
(if (null list-of-files)
(message "No files return by command “%s”" command)
(dired (cons "Command output" list-of-files)))))
(defun db/system-open (path)
"Open PATH with default program as defined by the underlying system."