Op 09-03-18 om 02:28 schreef Thorsten Glaser:
> Naturally. However, the “bug” seems to only apply to
> trim operations,

Yes, that is expected because trim operations use glob pattern notation
(as in 'case'). Shell quoting is explicitly part of glob pattern
notation, so that you can escape glob characters, etc.

Simple parameter substitutions such as ${foo+'bar'} do not use glob
pattern notation, so the quotes aren't parsed by the substitution.
(Quote removal may still be done *after* processing the substitution,
but that depends on the context and doesn't happen in here-documents.)

> dash (which fails 4 and 5),

Yes, it has the same bug as mksh, in fact it came up on the dash list so
I tested other shells and found it on mksh (and pdksh) as well.

Dash and pdksh are expected to fail 5, though, as they don't support
$'this' quoting style.

- M.

Reply via email to