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
Apply case modification per value for quoted array and positional argument expansions. The @ forms preserve argument boundaries and the * forms join using the first character of IFS. With adjacent text inside the quote, attach it to the first and last arguments. Single-character case operators with an explicit pattern check the leading character.
Verified 18 cases directly against GNU Bash 5.3.9. The regression suite also checks that aggregate output still respects the string limit. Interpreter and adjacent limit suites passed with 1,379 passed and one skipped. Typecheck and changed-file lint passed.
A clean checkout also passed the repository lint, build, and all 1,059 comparison tests.
The full local unit run had 15,377 passes, 98 skips, and four filesystem test failures. All four failures also reproduced on the untouched upstream commit on this machine.
Automated, advisory triage for @Prasad-178's PR. Facts below are read from the GitHub API.
Check
Result
Author's merged PRs (this repo)
0 — ⚠️ first-time contributor
Account established
✅ (age 1794d · 20 followers · 75 public repos)
Commits signed/verified
✅ 4/4
Changeset included
✅ (.changeset/quoted-case-arguments.md)
Review panel: 🟡 medium highest severity
just-bash maintainer code review: 🟡 medium
The core fix works for covered cases, but the new expansion path breaks neighboring list operations and brace-produced tilde expansion.
packages/just-bash/src/interpreter/expansion/word-glob-expansion.ts:718 — Other quoted list operations beside a case-modified expansion are collapsed to one string at this fallback. For example, `a=(x y); b=(z); set -- "${a[@]/x/X}${b[@]^}"` should produce `X` and `yZ`, but the pattern replacement is expanded as `X y`, yielding one argument. Preserve boundaries for all word-producing `@` operations.
packages/just-bash/src/interpreter/expansion/word-glob-expansion.ts:155 — The brace-special path converts alternatives to literals and bypasses the usual post-brace tilde expansion. A word such as `~{root,}/"${a[@]^}"` therefore leaves `root` and `` unexpanded whenever the quoted case-modified array triggers this path.
General code review: 🟡 medium
The new quoted-case expansion path still loses argument boundaries for nested brace alternatives and adjacent list-producing parameter operations.
packages/just-bash/src/interpreter/expansion/word-glob-expansion.ts:149 — Quoted case modification is detected only at the top level. In `{x"${a[@]^}",y}`, the expansion is nested inside `BraceExpansion`, so it follows the old scalar path and collapses the array instead of producing `xAb`, `Cd`, and `y`. Search brace alternatives recursively or detect after preserving brace parts.
packages/just-bash/src/interpreter/expansion/word-glob-expansion.ts:718 — The compositor scalarizes neighboring multi-value operations not recognized by `isQuotedListParameter`. For `a=(ax bx); b=(c d); set -- "${a[@]/x/z}${b[@]^}"`, the pattern replacement becomes one `az bz` value, yielding two arguments instead of Bash's `az`, `bzC`, and `D`. Preserve boundaries for all array/positional list-producing operators.
Adversarial security: 🟢 low
No actionable adversarial security issues found in the complete diff.
Adversarial security (second opinion): 🟢 low
Self-contained word-expansion fix with no untrusted-input, networking, dependency, or sandbox-limit implications; glob escaping and execution limits are correctly preserved on the new code path.
Standard Bash and host portability: 🟡 medium
The quoted case-modification implementation loses boundaries when combined with other array operations and remains incorrect for redirect targets.
packages/just-bash/src/interpreter/expansion/word-glob-expansion.ts:557 — The special path flattens adjacent quoted array expansions with operations other than case modification or substring. For example, `"${a[@]/a/A}${b[@]^}"` should produce `Ab`, `cdEf`, `Gh`, but the first array is expanded as one space-joined string, losing an argument boundary.
packages/just-bash/src/interpreter/expansion.ts:572 — Redirect ambiguity detection excludes case-modified `$@`. With two positional parameters, `: > "${@^}"` must fail with an ambiguous redirect in Bash, but this path joins the parameters and accepts a single filename.
Posted by auto-maintain. This automated code review is advisory; a human maintainer makes the call.
privatenumber
added
awaiting-review
Maintainer review or re-review is next. Does not imply approval or merge readiness.
bug
Something isn't working
p2
Normal backlog action. Priority is not acceptance or a delivery promise.
shell
Parsing, quoting, expansion, pipelines, redirection, and shell execution
labels
Dec 1, 2026
This branch has not been deployed
No deployments
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
awaiting-reviewMaintainer review or re-review is next. Does not imply approval or merge readiness.bugSomething isn't workingp2Normal backlog action. Priority is not acceptance or a delivery promise.shellParsing, quoting, expansion, pipelines, redirection, and shell execution
3 participants
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.
Addresses item 4 of #758.
Apply case modification per value for quoted array and positional argument expansions. The
@forms preserve argument boundaries and the*forms join using the first character of IFS. With adjacent text inside the quote, attach it to the first and last arguments. Single-character case operators with an explicit pattern check the leading character.Verified 18 cases directly against GNU Bash 5.3.9. The regression suite also checks that aggregate output still respects the string limit. Interpreter and adjacent limit suites passed with 1,379 passed and one skipped. Typecheck and changed-file lint passed.
A clean checkout also passed the repository lint, build, and all 1,059 comparison tests.
The full local unit run had 15,377 passes, 98 skips, and four filesystem test failures. All four failures also reproduced on the untouched upstream commit on this machine.