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.
--
|| modernish -- harness the shell
|| https://github.com/modernish/modernish
||
|| KornShell lives!
|| https://github.com/ksh93/ksh