[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on
From: |
Eli Zaretskii |
Subject: |
bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows |
Date: |
Thu, 23 May 2024 16:37:55 +0300 |
> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: dmitry@gutov.dev, 71081@debbugs.gnu.org, matt@excalamus.com
> Date: Thu, 23 May 2024 12:06:25 +0000
>
> Then, what about something like
>
> (shell-command-to-string "echo foo\necho bar")
>
> On Linux, it yields
> "foo
> bar"
>
> On Windows, it yields
>
> "foo"
Yes, because the Windows shell doesn't support command lines with
embedded newlines, so it ignores everything past the first newline.
(Actually, there are complicated tricks to do that, but I'll spare
you.)
Instead, you should do this on Windows:
(shell-command-to-string "echo foo && echo bar")
This is the documented method of invoking cmd.exe with multiple
commands.
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Ihor Radchenko, 2024/05/20
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Eli Zaretskii, 2024/05/20
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Dmitry Gutov, 2024/05/21
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Eli Zaretskii, 2024/05/21
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Ihor Radchenko, 2024/05/22
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Eli Zaretskii, 2024/05/22
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Ihor Radchenko, 2024/05/22
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Eli Zaretskii, 2024/05/22
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Ihor Radchenko, 2024/05/23
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows,
Eli Zaretskii <=
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Ihor Radchenko, 2024/05/23
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Eli Zaretskii, 2024/05/23
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Ihor Radchenko, 2024/05/23
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Eli Zaretskii, 2024/05/25
- bug#71081: 30.0.50; shell-command-on-region outputs boilerplate text on Windows, Eli Zaretskii, 2024/05/25