Skip to content

[bug] f1=$(case z in esac) (empty case in comsub) dies 'unexpected end of file' (GNU: empty result) #284

Closed

Description

@caomengxuan666

wt7/resid1 pre-existing (verified at base): empty case inside a command substitution trips the unclosed-comsub detection (driver-side scanner family — possibly continuation.rs territory, left to captain per exclusivity). Repro: f1=$(case z in esac); echo "[$f1]" — GNU prints [] rc=0.

Activity

  1. caomengxuan666 commented on Sep 28, 2026

    @caomengxuan666
    MemberAuthor

    Fixed by resid3 lane bc6e6da7 (cherry-picked to master as 7a10832): empty case in command substitution. Acceptance: WSL GNU Bash 5.3.0 byte-identical on the full probe family (folded token, non-empty case control, spaced, quoted, multiline) — both rc=0; unguarded-esac error shape identical too. 490/490 lib tests green.

  2. added a commit that references this issue on Sep 28, 2026
  3. added
    bug
    area:parser
    family:S5
    on Oct 17, 2026
  4. added a commit that references this issue on Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:parserbugfamily:S5

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions