From 37a3299b4ba1aea1509b187cbd67b0bc8990653e Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 11 Jan 2020 14:13:03 +0000 Subject: [PATCH] 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 --- README | 2 +- generate | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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}"; } -- 2.30.2