Repository navigation
fix(interpreter): toggle case, prefix-name splitting, mapfile options - #2601
Merged
Merged
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
bashkit | 0a6ce1e | Commit Preview URL Branch Preview URL |
Oct 07 2026, 10:02 PM |
chaliy
force-pushed
the
claude/param-expansion-gaps
branch
from
October 7, 2026 21:42
7136e5c to
e4c7d23
Compare
${v~}/${v~~} toggle case; "\/" in a replacement is a plain slash; unquoted
${!pre@}, ${!ref}, substrings, slices and ${v@op} are field-split; mapfile
supports -d, -n, -s, -O and grouped options.
Claude-Session: https://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
chaliy
force-pushed
the
claude/param-expansion-gaps
branch
from
October 7, 2026 22:01
e4c7d23 to
0a6ce1e
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Requested by Михайло · project thread
What changed
${v~}and${v~~}toggle case (first char / all chars), also per element for${a[@]~~}.\/in a${v/pat/rep}replacement is a plain/, so${p//./\/}turnsa.b.cintoa/b/c.${!prefix@},${!ref},${v:off:len},${a[@]:o:n}and${v@op}now go through IFS field splitting like$vdoes, sofor v in ${!cfg_@}loops once per name.mapfile/readarraygained-d DELIM(''is NUL),-n COUNT,-s COUNT,-O ORIGIN(keeps the other elements) and grouped options like-tn1. Unknown options,-u FDother than 0 and the-C/-ccallback exit 2 with a message (L-MAPFILE-001). Before, an option value like,in-d ,was taken as the array name.Why
Debian-oracle cases
param-case-modification,param-replace,param-indirect-and-namesandmapfile-readarrayfailed on these.Before / After
s="hello World"; echo "${s~~}"hello WorldHELLO wORLDp=a.b.c; echo "${p//./\/}"a\/b\/ca/b/cfor v in ${!cfg_@}; do echo $v; donecfg_host cfg_port(one pass)mapfile -t -d , f <<< "a,b,c"[a][b][c\n]readarray -t -s 1 -n 2 p < fNew spec file
param-expansion-gaps.test.sh(7 cases), verified against bash 5.2. The bashbox casemapfile_on_nul_delimitersis no longer skipped.Risk
Medium-low. Field splitting now applies to more unquoted expansion kinds; that matches bash, and the full spec, integration and bash-comparison suites pass. The recursion stack probe is unchanged (2032–2036 KB, main 2028–2036 KB).
Checklist
cargo test -p bashkit --lib,--test integration, bash_comparisoncargo clippy --all-targets -D warnings,cargo fmt --checkhttps://claude.ai/code/session_019aFikmptPc91Fj4N2iDXQA
Generated by Claude Code