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
[bug] Single-quoted external arg inside $(): backslash dropped AND ${VAR} brace-stripped before exec - sed gets 'n' for '\n' and '$VAR' for '${VAR}' (hawaii50) #417
Found by wt53/themesweep (2026-10-03), hawaii50 theme load sweep (corpus abf8461, WSL GNU 5.3.0 oracle).
Minimal reproducer (script file, both shells)
out=$(printf 'You do not need one\nsecond line\n'| sed -e :a -e '$!N;s/\n/${SEP}/;ta')
GNU 5.3.0 (same sed semantics as Git GNU sed 4.9): pattern \n matches the newline; the single-quoted replacement ${SEP} stays literal -> lines joined with the literal text ${SEP}.
rubash 1.3.0: the letter n is substituted everywhere (o, seco) AND the replacement loses its braces (${SEP} -> $SEP) - i.e. rubash delivered the sed program with the backslash dropped and the braces stripped.
Observed from the sweep (hawaii50, no ip/ifconfig on Windows so the theme's error path runs):
GNU: IPs / clean text
rubash: You do$IP_SEPARATOR't have ifco$IP_SEPARATORfig or ip comma$IP_SEPARATORd i$IP_SEPARATORstalled!
Git Bash (same GNU sed 4.9 binary rubash resolves via PATH) executes the same line correctly, so this is rubash's argument delivery for single-quoted words inside $( ) pipelines, not sed.
Related: #301 (backslash dropped from single-quoted ALIAS body - same loss, different surface). GNU spec for literal single-quoted words: parse.y:5305 read_token_word(); here the comsub body split path is implicated (subst.c:1148 string_extract_verbatim / parse_comsub interplay).
Activity
fix(expand): single-quoted words keep integrity through pipeline and …