summaryrefslogtreecommitdiffhomepage
path: root/bench/probes/git@git.abendless.com:/srv/git
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-28 00:33:12 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-28 00:33:12 -0600
commit662f3b37dcfad0fd2f193762464c1b9701c96db9 (patch)
tree311cacd64bda80ca200de6f3715c786ec5a5dc53 /bench/probes/git@git.abendless.com:/srv/git
parent447151dabfbad0a41c8f049938042cd886d9f451 (diff)
downloadzash-662f3b37dcfad0fd2f193762464c1b9701c96db9.tar.gz
fix(expand): trim each positional parameter for ${@#pat}
`"${@#ab}"` with `set -- abc abd` joined the parameters first ("abc abd"), trimmed the join, and emitted that as a single field ("c abd"). ksh93 and bash trim each parameter and then apply the "$@" rules: two fields, "c" and "d". expand_all_params() takes the pattern and the operator and trims every parameter before emitting, so `"${@#pat}"` still gives one field each, `"${*#pat}"` one field joined by IFS, and unquoted both split as before. join_params_trimmed() is the join path, and trim() gets a forward declaration because it sits further down the file. Test: tests/zash/trim-all.sh, twelve lines covering all four operators, @ and *, quoted and unquoted, empty parameters and a non-blank IFS. The expected output is ksh93's and bash's, which agree line for line. Verified on Linux with make check.
Diffstat (limited to 'bench/probes/git@git.abendless.com:/srv/git')
0 files changed, 0 insertions, 0 deletions