From: Ian Jackson Date: Sat, 11 Jan 2020 14:13:03 +0000 (+0000) Subject: Syntax: Incompatible change: &$( does not do daft { thing X-Git-Tag: subdirmk/0.4~4 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=subdirmk.git;a=commitdiff_plain;h=37a3299b4ba1aea1509b187cbd67b0bc8990653e Syntax: Incompatible change: &$( does not do daft { thing 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 --- diff --git a/README b/README index d85a688..e5a415f 100644 --- a/README +++ b/README @@ -239,7 +239,7 @@ $ => $$ including $'s produced by other &-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 diff --git a/generate b/generate index b564260..b682299 100755 --- a/generate +++ b/generate @@ -367,7 +367,7 @@ sub process_input_mk ($$$$) { 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}"; }