HomeFreeBSD

sh: Allow unquoted newlines in word in ${param+word} etc.

Description

sh: Allow unquoted newlines in word in ${param+word} etc.

POSIX requires accepting unquoted newlines in word in parameter expansions
like ${param+word}, ${param#word}, although the Bourne shell did not support
it, it is not commonly used and might make it harder to find a missing
closing brace.

It was also strange that something like

foo="${bar#
}"

was rejected.

Reported by: Martijn Dekker via Robert Elz

Details

Provenance
jillesAuthored on
Parents
rS333926: MFC r333715:
Branches
Unknown
Tags
Unknown