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
parser: case ... esac | cmd — case command as a pipeline stage is rejected (GNU accepts) #385
Found during wt33 triage of #373. Real semantic gap (not a stale assertion — the AST test asserting pipeline_command for a case stage is left ignored until this is fixed).
case $w in yes) echo yes ;; *) echo no ;; esac | grep yes
echo rc=$?
WSL GNU Bash 5.3.0:
rc=1 (pipeline runs: `echo no` is filtered out by grep; outer rc from grep)
empty stderr
rubash:
(empty stdout)
stderr: <script>: line 1: syntax error near unexpected token `|'
<script>: line 1: `case $w in yes) echo yes ;; *) echo no ;; esac | grep yes'
rc 2
Notes
Raw artifacts: target/issue-suites/results/wt33-373/run/B07_case_pipe.* and A21_case_pipeline.* (byte-compared by run_cases.sh).
Owning area: case-command terminator admission in the parser (esac ends the command; a following | should continue the pipeline grammar instead of erroring — GNU parse.y case_command is a compound_command which pipelines accept).
Test left as tracker: tests/parser_tests.rs test_case_command_pipeline_stage (#[ignore] referencing this issue).
Landed on master (wt37/gapfix1 batch, CI green on bbccb1c): see the issue-suite tests/issue385_*_regressions.rs and the lane's two-shell matrices on the ticket trail. Master carries the fix; suites green.
Activity
tests(#374): wt37 round-2 gap families ignored with tickets + residua…
fix(#385): case command as a pipeline stage — `|` after esac is a con…
fix(#386): reject a bare `(' in for/select word lists (extglob off-ga…
caomengxuan666 commentedon Oct 2, 2026
Landed on master (wt37/gapfix1 batch, CI green on bbccb1c): see the issue-suite tests/issue385_*_regressions.rs and the lane's two-shell matrices on the ticket trail. Master carries the fix; suites green.