Skip to content

fix(interpreter): handle unclosed POSIX case patterns#302

Open
obinnanwachukwu1 wants to merge 1 commit into
vercel-labs:mainfrom
obinnanwachukwu1:fix/unclosed-posix-case-pattern
Open

fix(interpreter): handle unclosed POSIX case patterns#302
obinnanwachukwu1 wants to merge 1 commit into
vercel-labs:mainfrom
obinnanwachukwu1:fix/unclosed-posix-case-pattern

Conversation

@obinnanwachukwu1

Copy link
Copy Markdown

Fixes #301.

Summary

  • scan shell character classes without mistaking an inner POSIX :], collating .], or equivalence =] terminator for the outer closing bracket
  • preserve the Bash literal-[ fallback when the outer bracket is unmatched
  • add a regression covering both the non-match and literal-prefix match behavior
  • add a patch changeset

Verification

  • pnpm --filter just-bash exec vitest run src/interpreter/control-flow.test.ts
  • pnpm --filter just-bash test:comparison (560 passed)
  • pnpm --filter just-bash test:unit (13,187 passed, 97 skipped)
  • pnpm --filter just-bash build
  • pnpm --filter just-bash typecheck
  • pnpm --filter just-bash lint
  • pnpm --filter just-bash knip

@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

@obinnanwachukwu1 is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

case pattern with unmatched outer POSIX class bracket throws SyntaxError

1 participant