[exim-dev] Re: [Bug 3041] Error on ${run{/usr/bin/echo ${quo…

Startseite
Nachricht löschen
Nachricht beantworten
Autor: andrew--- via Exim-dev
Datum:  
To: Exim Bugzilla
CC: exim-dev
Betreff: [exim-dev] Re: [Bug 3041] Error on ${run{/usr/bin/echo ${quote:hello world}}}
On Wed, 25 Oct 2023, Exim Bugzilla via Exim-dev wrote:

> https://bugs.exim.org/show_bug.cgi?id=3041
>
> Andreas Metzler <eximusers@???> changed:
>
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>         Resolution|INVALID                     |---
>             Status|RESOLVED                    |REOPENED

>
> --- Comment #3 from Andreas Metzler <eximusers@???> ---
> (In reply to Jeremy Harris from comment #1)
>> Working as documented:
>>
>> "If the option preexpand is not used, the command string is split into
>> individual arguments by spaces and then each argument is expanded."
>>
>> So you had "${run{/usr/bin/echo" as the first argument of the
>> command string, and that has no closing braces.
>
>
> If that is what happens there is misparsing at an earlier stage:
> Matching
> ${run <options> {<command arg list>}{<string1>}{<string2>}}
> onto
> ${run{/usr/bin/echo ${quote:hello world}}}
>
> yields <options>, {<string1>} and {<string2> as empty or missing and a
> "<command arg list>" of "/usr/bin/echo ${quote:hello world}".
>
> It does not make a difference whether this <command arg list>
> is expanded after or before splitting.


Splitting
     "/usr/bin/echo ${quote:hello world}"
gives
     "/usr/bin/echo" "${quote:hello" "world"
exanding that gives a syntax error.


Expanding
   "/usr/bin/echo ${quote:hello world}"
gives the moral (not textual) equivalent of
     "/usr/bin/echo hello&nbsp;world"
which splits as
     "/usr/bin/echo" "hello world"


> Another proof of something fishy going is that setting
> the "preexpand" option which is supposed to bring back
> the old behavior does not help.


AIUI Lena demonstrated the original behavior with preexpand.

-- 
Andrew C. Aitchison                      Kendal, UK
                    andrew@???


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-dev.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-dev-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/