Skip to content

feat(interpreter): implement glob options (dotglob, nocaseglob, failglob, noglob, globstar)#269

Merged
chaliy merged 1 commit intomainfrom
claude/bashkit-bash-compatibility-BsDKD
Feb 25, 2026
Merged

feat(interpreter): implement glob options (dotglob, nocaseglob, failglob, noglob, globstar)#269
chaliy merged 1 commit intomainfrom
claude/bashkit-bash-compatibility-BsDKD

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Feb 25, 2026

Summary

  • Enforces shopt glob options during glob expansion: dotglob, nocaseglob, failglob, noglob (set -f), globstar
  • Adds case-insensitive matching to glob_match and match_bracket_expr
  • Gates ** recursive glob on shopt -s globstar (bash-compatible behavior)
  • Refactors three glob expansion call sites into shared expand_glob_item helper
  • Adds 13 spec tests covering all glob options

Test plan

  • All 1424 spec tests pass (1419 pass, 5 skip)
  • cargo clippy clean
  • cargo fmt clean
  • Existing glob_recursive test updated to use shopt -s globstar

…lob, noglob, globstar)

Enforce shopt glob options during glob expansion:
- dotglob: include dotfiles in * matches
- nocaseglob: case-insensitive glob matching
- failglob: error on unmatched globs
- nullglob: already worked, now uses shared helper
- noglob (set -f): skip glob expansion entirely
- globstar: gate ** recursive matching on shopt setting

Also refactors glob expansion call sites to use shared
expand_glob_item helper, reducing code duplication.

Adds 13 spec tests for glob options.

https://claude.ai/code/session_012rzB3FRw7yoQWCG1mxyW7J
@chaliy chaliy merged commit 9e32c33 into main Feb 25, 2026
16 checks passed
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