It is silly for &$( to expand to ${. That requires the input to
contain non-matched kinds of brackets.
The shell compatibility is not needed. In a shell rune, you can write
&\$thing since the { } are not normally needed there at all. If they
are then now &\${thing} is necessary. It would be possible to steal
"&${" (or allow only "&$(") but that seems less good.
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
&-expansions not mentioned here
&\$ => $
-&$( => ${ (expands to { } so it is useable for shell too)
+&$( => $(
&$NN => ${NN} where N are digits
A few contexts do not support $-doubling, such as directive arguments
elsif (s{^\$\-}{}) { $ddbl=undef; }
elsif (s{^\$\+}{}) { $ddbl=1; }
elsif (s{^\$\(}{}) {
- ddbl_only($&); oud "\${";
+ ddbl_only($&); oud "\$(";
$note_varref->($2,!!$1) if m{^($esc)?([^()\$]+\))};
}
elsif (s{^\$(\d+)}{}) { ddbl_only($&); oud "\${$1}"; }