On 27/01/2021 16.07, Clark Wang wrote:
> $(|cmd ...) makes more sense for me. '|' is a pipe which means passthrough.
> 
> For future extensions, use
> 
>   $(&flag1[=value1]&flag2[=value2] cmd ...)
> 
> For example,
> 
>   $(&keep_trailing_newlines cmd ...) is just the same as $(|cmd ...).
>   $(&no_fork cmd ...) means the ksh style ${ cmd ... }.

But piping basically connects subshells, and the semantics was supposed
to be "no subshell". Why then not this:

$(; var1=val2 var2=val2 command;)

Because a semicolon normally does not start a subshell, and "$(; ;)" is
more or less a clean and meaningful delimiter. Although it still has the
( ) parentheses which indicate a subshell...

${; var1=val2 var2=val2 command;}

(Confusing for using the "${ }" variable substitution semantics...)

"${{ }}" is then not so bad an option, duplication of brackets to
change/enhance the semantics is already a thing in bash.

Peter

Reply via email to