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] Brace expansion empty member emits a spurious empty field: set -- {a,} yields argc=2 (GNU: 1) #337
Found by gnusweep3 lane (GNU-syntax deep-water matrix, cat2 e057/e058; WSL GNU Bash 5.3.0 script-file oracle, worktree 0fe8d0f release build).
Repro:
set -- {a,}
echo"argc=$#"set -- {,a}
echo"argc=$#"
GNU 5.3.0: argc=1 / argc=1 (the empty alternative produces no positional word; unquoted empty word is dropped).
rubash: argc=2 / argc=2 — a spurious empty word survives into the word list (visible as trailing space in echo {a,} -> a vs GNU a).
GNU C owner: braces.c brace_expand() (braces.c:104) — the empty preamble/postamble/alternative path; the resulting word list drops the empty word before field assignment (subst.c expand_word_list_internal, subst.c:13219).
Artifacts: target/issue-suites/results/gnusweep3/cat2/case/e057.* / e058.; minimal probes target/issue-suites/results/gnusweep3/probes/min/m02-brace-empty.
Fixed by wt20/deepsweep (4bcd2b62): {a,} null word was dropped at brace-result assembly (subst.c:12026-12035); sequence elements exempt ({a..A} keeps 33 args including the backslash element).
Activity
gnusweep3: GNU-syntax deep-water wave 3 — orphan-sub harvest + 8 cons…
fix(#337,#338,#341,#342): brace null word, ${!prefix@} list, octal st…
fix(#337): scope the brace-null drop to alternative members, not word…
caomengxuan666 commentedon Sep 30, 2026
Fixed by wt20/deepsweep (4bcd2b62): {a,} null word was dropped at brace-result assembly (subst.c:12026-12035); sequence elements exempt ({a..A} keeps 33 args including the backslash element).