[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#47432: 28.0.50; Dired using ! or & on file should fail without comma
From: |
Arthur Miller |
Subject: |
bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied |
Date: |
Sat, 27 Mar 2021 14:59:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Jean Louis <bugs@gnu.support> writes:
> * Arthur Miller <arthur.miller@live.com> [2021-03-27 10:52]:
>> Jean Louis <bugs@gnu.support> 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.
>>
>> Why is "Command not entered" to prefer to "Command not found"?
>
> It is meant as example, I leave those decisions to developers.
>
> Now I can see that ! and & without command are acting on the file as
> the file should be executed.
>
> Let us say I have Screenshot.pl executable file, if I run ! on it, the
> file is executed.
Ja. I guess there is a shebang on it so bash invoked perl interpreter
and executed the file.
> This means there was attempt to execute ~/.asoundrc -- I find that
> insecure and not logical.
Ja. Because you invoked a command that will execute a script on a
file. And since file wasn't executable it failed. So why is it insecured?
> And I do not understand it quite how it works. Was there an attempt to
> execute program with bash?
How you seen the docs? For example C-h k ! RET:
Signature
(dired-do-shell-command COMMAND &optional ARG FILE-LIST)
Documentation
Run a shell command COMMAND on the marked files.
> Why should there be attempt to execute non-executable files?
Because you asked it to by calling ! or & on a file in Dired.
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Jean Louis, 2021/03/27
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Arthur Miller, 2021/03/27
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Jean Louis, 2021/03/27
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied,
Arthur Miller <=
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Jean Louis, 2021/03/27
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Arthur Miller, 2021/03/27
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Jean Louis, 2021/03/28
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Eli Zaretskii, 2021/03/28
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Jean Louis, 2021/03/29
- bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Eli Zaretskii, 2021/03/29
bug#47432: 28.0.50; Dired using ! or & on file should fail without command supplied, Lars Ingebrigtsen, 2021/03/28