Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1
Op 22-05-2023 om 16:18 schreef Chet Ramey:
I'd call that a bug. It's not how mksh documents this type of command
substitution to work. ksh93 documents the parsing the same way.
So it does, yet ksh93 also accepts omitting the ;.
The only documentation of this is in the legacy changelog:
08-03-10 The new ${...} command substitution will treat the trailing }
as a reserved word even if it is not at the beginning of a command,
for example, ${ date }.
Which means something like 'echo }' breaks in such a comsub.
It is what it is. I will fix the documentation to match reality in ksh
93u+m.