You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ANSI-C $'...' array element with decoded quote stores untagged bare quote (quote removal strips it) #109
Repro (vs GNU bash 5.3.0(1), WSL /usr/local/bin/bash oracle)
x=($'a"b');printf'%s'"${x[0]}"| od -An -tx1
# GNU 5.3.0: 61 22 62 (a"b)# rubash: 61 62 (ab)
Analysis
The compound-assignment storage split receives the ANSI-C-decoded element as a"b — a bare" with no E010/E011 tagging (the escape_decoded_ansi_c_quotes marker contract is not applied on this path). append_array_value then runs quote removal over the partially-quoted token
and treats the bare " as an operator pair, stripping the decoded data quote.
Discovered while fixing the niubash #103 array side-findings
(rubash PR #108, commit 742a544). The ordering fix there
(raw-token quote removal -> carrier restore -> unquote) fixed the
backslash-escape cases (x=(q\"q), x=("q\"q")) and the sh_double_quote render cases, but this variant needs the upstream
ANSI-C decoder to tag decoded quotes so quote removal can tell data
from syntax — a different layer.
Pre-existing on master 9729b14; not a regression of #108.
Fixed by cb0c0ed (merged 3017d93). Root causes: UTF-8 latin-1 promotion in rewrite_compound_element_subscripts; missing U+E010/E011 carrier restore at the storage boundary (quote_array_value); wrong fully-quoted detection for mixed-quote tokens; empty $'' dropped; $' decoded inside "..." in compounds. 28/28 probes byte-identical to GNU 5.3.0 including the original 61 22 62 repro. Residuals documented in commit message.
Activity
fix(arrays): preserve ANSI-C elements and integer declaration storage
fix(intl/array/trap): land local master batch (30d42e61 + gnu-compat …
fix(arrays): preserve ANSI-C decoded quote data through compound stor…
caomengxuan666 commentedon Sep 18, 2026
Fixed by cb0c0ed (merged 3017d93). Root causes: UTF-8 latin-1 promotion in rewrite_compound_element_subscripts; missing U+E010/E011 carrier restore at the storage boundary (quote_array_value); wrong fully-quoted detection for mixed-quote tokens; empty$'' dropped; $ ' decoded inside "..." in compounds. 28/28 probes byte-identical to GNU 5.3.0 including the original 61 22 62 repro. Residuals documented in commit message.
fix(comsub): admit word-level substitution shortcuts by whitelist (#117)