Skip to content

fix(opt): pseudo-options batch 2 (#1411); nice command boundary (#1408); dirname // (#1337) - #1420

Merged
caomengxuan666 merged 3 commits into
mainfrom
fix/iss-compat-small
Oct 27, 2026
Merged

caomengxuan666 merged 3 commits into
mainfrom
fix/iss-compat-small

Conversation

@caomengxuan666

Copy link
Copy Markdown
Member

Fixes #1411. Fixes #1408. Fixes #1337.

#1411 (pseudo-options batch 2, #1355 treatment): drops join --empty/-k/--key, ls --long/--long-list, timeout -f/-p/-l, cksum -q/-s/-r and cp -g — each with a GNU rejection pin and a legal-form control. One correction to the agent draft during verification: the join -e control case needed -a1 and a genuinely unpaired fixture (an inner join cross-matches repeated keys, so no field is ever missing); implementation behavior verified against GNU semantics manually.

#1408: stdbuf already stops at the wrapped command (#1375 landed the pass-through) — regression pins added for both the path-form probe (stdbuf -o0 ./echo -n hi) and the bare form. The real residual was nice: routed through the stop_options_after_positionals policy like env/xargs, with nice -n 5 ls -l pinning that ls keeps its own flags.

#1337: dirname // now folds to / (the exactly-two-slash window is preserved only when more path follows — dirname //a/b stays //a).

Full suite on the branch: 3350 tests — 3349 passed, the 1 failure being the environment-bound cksum.issue_1288 baseline (LongPathsEnabled=0). i18n delta: none (extract diff clean).

Same treatment as #1355, per the verified report table: drop join
--empty/-k/--key, ls --long/--long-list, timeout -f/-p/-l, cksum
-q/-s/-r and cp -g declarations together with their handler read
points. Every removal carries a rejection pin asserting the GNU
diagnostic and exit code plus a legal-form control (join -o/-e, ls -l,
timeout's real options, cksum's algorithms, cp's real flags).
nice.c parses with a leading-'+' optstring, so its own options end at
the first non-option argument and the wrapped command keeps its own
flags — route nice through the stop_options_after_positionals policy
like env (#1353) and xargs. stdbuf already passes wrapped options
through (#1375); add the path-form and bare-form regression pins from
the issue probe to lock that in.
GNU reduces an all-slash operand to a single slash; the exactly-two-
slash window stays preserved only when more of the path follows
(dirname //a/b is still //a).
@caomengxuan666
caomengxuan666 merged commit 26e9fc9 into main Oct 27, 2026
4 of 5 checks passed
@caomengxuan666
caomengxuan666 deleted the fix/iss-compat-small branch October 27, 2026 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant