From: Jeremy Harris Date: Sat, 1 Apr 2023 18:48:15 +0000 (+0100) Subject: Docs: options after "run" of ${run } may not have space. Bug 2932 X-Git-Tag: exim-4.97-RC0~91 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/d5939cf05037d4a70ca43ec4d436c2e699530444 Docs: options after "run" of ${run } may not have space. Bug 2932 --- diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 8055daebe..86f8dda63 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -10587,12 +10587,13 @@ expansion items. This item inserts &"raw"& header lines. It is described with the &%header%& expansion item in section &<>& above. -.vitem "&*${run <&'options'&> {*&<&'command&~arg&~list'&>&*}{*&<&'string1'&>&*}&&& +.vitem "&*${run<&'options'&> {*&<&'command&~arg&~list'&>&*}{*&<&'string1'&>&*}&&& {*&<&'string2'&>&*}}*&" .cindex "expansion" "running a command" .cindex "&%run%& expansion item" This item runs an external command, as a subprocess. -One option is supported after the word &'run'&, comma-separated. +One option is supported after the word &'run'&, comma-separated +and without whitespace. If the option &'preexpand'& is not used, the command string is split into individual arguments by spaces diff --git a/src/src/expand.c b/src/src/expand.c index 6dcd45062..9f80439cb 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -5630,7 +5630,6 @@ while (*s) /* Handle options to the "run" */ while (*s == ',') - { if (Ustrncmp(++s, "preexpand", 9) == 0) { late_expand = FALSE; s += 9; } else @@ -5641,7 +5640,6 @@ while (*s) (int)(t-s), s); goto EXPAND_FAILED; } - } Uskip_whitespace(&s); if (*s != '{') /*}*/