Subject: bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 28 Mar 2021 16:03:32 +0200

Jean Louis <[email-masked]> writes:

> In Dired, when using ! or & on a file, it should file if there is no
> command supplied.
>
> This is what happens if I use ! on file ~/.asoundrc but without
> supplying command, just pressing RET:
>
> /bin/bash: line 1: .asoundrc: command not found
>
> But it should not, if command is not supplied in:
> (dired-do-shell-command COMMAND &optional ARG FILE-LIST) -- then it
> shall rather silently fail or tell "Command not entered" or nothing to
> do.

I think that would be a bit odd.  But I see that the doc string doesn't
explicitly say that happens here, so I've added the following sentence
to the doc string in Emacs 28:

----
When executing, FILE-LIST is appended to the COMMAND string.
----

And that's what happening here -- COMMAND is "", and FILE-LIST is
appended to that, and then executed.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no