Skip to content

fix(interpreter): apply brace/glob expansion in for-loop word list#211

Merged
chaliy merged 1 commit intomainfrom
claude/review-bash-color-pr-15cMq
Feb 18, 2026
Merged

fix(interpreter): apply brace/glob expansion in for-loop word list#211
chaliy merged 1 commit intomainfrom
claude/review-bash-color-pr-15cMq

Conversation

@chaliy
Copy link
Contributor

@chaliy chaliy commented Feb 18, 2026

Summary

  • execute_for now applies expand_braces and expand_glob to each word in the for-loop word list, matching execute_dispatched_command behavior
  • Quoted words correctly skip brace/glob expansion
  • Fixes for i in {1..5} iterating once with literal {1..5} instead of expanding to 1 2 3 4 5

Test plan

  • 9 new brace-expansion-in-for-loop tests (numeric range, comma, prefix, nested, reverse, alpha, mixed words, quoted skip, single-no-expand)
  • 2 new glob-in-for-loop tests (match + no-match keeps literal)
  • 1 new array+brace mixed for-loop test
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo test --all-features — all 14 test suites pass (594 spec cases, 99.8%+ pass rate)

Closes #204

`for i in {0..5}` iterated once with literal `{0..5}` instead of
expanding to separate values. execute_for now applies expand_braces
and expand_glob to each word, matching execute_dispatched_command
behavior. Quoted words still skip expansion.

Closes #204 (supercedes — most of that PR landed via #201)

https://claude.ai/code/session_01VcvUwWMdEbp2qW3V1dyUDZ
@chaliy chaliy merged commit 427c870 into main Feb 18, 2026
9 checks passed
@chaliy chaliy deleted the claude/review-bash-color-pr-15cMq branch February 18, 2026 00:18
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.

2 participants