On Sat, 6 Sept 2025 at 06:43, Chet Ramey <[email protected]> wrote:
> Anyone else have candidates for the command character?
>
How about if the lead character is newline?
${
*commands*
}
(Ordinarily I wouldn't suggest re-purposing “existing” syntax, but this
feature has only existed for a brief while, so perhaps we can still get
away with changing it?)
Alternatively, does it have to be a single byte?
${@N *whitespace* *commands* ;}
Are we allowed to venture into the realm of UTF-8?
${↓ *commands* ;}
${∢ *commands* ;}
${ᚹᛟᚱᚦᚱ *whitespace* *commands* ;} # Viking for “Guardian”
What about using the same modifiers as parameter expansions, with the
addition of a new @N operator that refrains from trimming any surrounding
whitespace, including newlines:
${*variable* @N}
${{ *commands* ;}@N}
${@N *whitespace* *commands* ;}
and more generally:
${*variable* @*operator*…}
${{ *commands* ;}@*operator*…}
${@*operator*… *whitespace* *commands* ;}
Does it even have to be non-alphanumeric?
${NOTRIM *whitespace* *commands* ;}
-Martin