man: fix first argument in Environment= expansion example

The example states that the first /bin/echo invocation (using ${ONE})
receives the argument 'one' (with literal single quotes). However,
Environment=ONE='one' strips the syntactic single quotes during
unquoting — see systemd.syntax(7), "Quotes themselves are removed" —
so ONE holds the value one, and ${ONE} (exact-value substitution,
always a single argument) yields the argument one without quotes.

Fixes #42442

Signed-off-by: Wang Yu <wangyu@uniontech.com>
This commit is contained in:
Wang Yu
2026-06-26 10:11:59 +01:00
committed by Luca Boccassi
parent 313986f21d
commit e61a0705db
+1 -1
View File
@@ -1618,7 +1618,7 @@ ExecStart=/bin/echo ${ONE} ${TWO} ${THREE}
ExecStart=/bin/echo $ONE $TWO $THREE</programlisting>
<para>This results in <filename>/bin/echo</filename> being
called twice, the first time with arguments
<literal>'one'</literal>,
<literal>one</literal>,
<literal>'two two' too</literal>, <literal></literal>,
and the second time with arguments
<literal>one</literal>, <literal>two two</literal>,