Repository navigation
fix(executor): drop the transport prefix before splitting indexed words (#621) - #660
Merged
Merged
Conversation
…ds (#621) v=' 1 '; plain=($v) produced 2 elements (["","1"]) where GNU produces 1. The field-split transport prefixes the word with a bookkeeping marker; the indexed consumer left it in the accumulator, so a leading separator pushed a marker-only first part decoding to a phantom "". GNU strips leading IFS whitespace (subst.c:3142 list_string). Two lines (both copies: executor split_indexed_tagged_token + declare storage twin): consume the transport prefix up front. The post-split map re-adds the prefix per part, so downstream bytes are unchanged for all previously-correct shapes. Assoc path untouched (already correct). Verification: new 30-case GNU differential 11/30 -> 30/30; the issue's named test flips fail->pass in the full gate; new tests/issue621_leading_split.rs (11 tests); focused suites green (the one failure fails identically on baseline); full serial failure-set gate vs master identical targets (NEW=0/DISAPPEARED=0; 1/3 coproc flake passing in isolation); niubash A/B byte-identical (49=49).
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix(executor): drop the transport prefix before splitting indexed words (#621)
What
v=' 1 '; plain=($v)produced 2 elements (["","1"]) where GNUproduces 1. The field-split transport prefixes the word with a
bookkeeping marker; the indexed consumer left it in the accumulator, so
a leading separator pushed a marker-only first part decoding to a phantom
"". GNU strips leading IFS whitespace (subst.c:3142 list_string).Fix
Two lines (both copies: executor
split_indexed_tagged_token+ declarestorage twin): consume the transport prefix up front. The post-split map
re-adds the prefix per part, so downstream bytes are unchanged for all
previously-correct shapes (verified: trailing-only, interior,
all-whitespace→empty, quoted-kept, assoc readback,
IFS=:leading-emptykept,
IFS=unsplit). Assoc path untouched (already correct, differentdecode).
Verification
(spaces/tabs/mix, scalar/assoc/indexed sources, literal/var
subscripts,
declare -apath, multi-word, IFS variants).compound_assignment_splits_unquoted_associative_array_elementflips fail→pass in the full gate (DISAPPEARED from the failing set).
tests/issue621_leading_split.rs(11 tests).bracket-glob, assoc-transform, declare/nameref); the one failure
(
issue298positionals) fails identically on baseline (Android env).Full serial failure-set gate vs master: target sets identical
(NEW=0/DISAPPEARED=0); test-level 1 NEW / 3 DISAPPEARED — the
DISAPPEARED includes the issue's named test (fail→pass), the rest are
the known-nondeterministic
part_080family (pass in isolation).6295367, only rubash[patch]switched): failure sets byte-identical (49=49).
GNU owners:
subst.c:3119 list_string(:3142leading strip),arrayfunc.c:610 expand_words_no_vars.