Skip to content

Commit 0944c13

Browse files
committed
docs: update Bash version references from 3.2+ to 3.0+
1 parent 320942c commit 0944c13

15 files changed

Lines changed: 111 additions & 89 deletions

File tree

.claude/CLAUDE.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Project Overview
44

5-
**bashunit** is a comprehensive, lightweight Bash testing framework (requires Bash 3.2+) focused on developer experience. It provides assertions, test doubles (spies/mocks), data providers, snapshots, and more.
5+
**bashunit** is a comprehensive, lightweight Bash testing framework (requires Bash 3.0+) focused on developer experience. It provides assertions, test doubles (spies/mocks), data providers, snapshots, and more.
66

77
**Documentation:** https://bashunit.typeddevs.com
88

@@ -11,7 +11,7 @@
1111
This directory (`.claude/`) contains comprehensive Claude Code configuration:
1212
- **Custom skills**: `/tdd-cycle`, `/fix-test`, `/add-assertion`, `/check-coverage`, `/pre-release`
1313
- **Custom commands**: `/gh-issue` (complete GitHub issue → PR workflow)
14-
- **Modular rules**: Bash 3.2+ compatibility, testing patterns, TDD workflow
14+
- **Modular rules**: Bash 3.0+ compatibility, testing patterns, TDD workflow
1515
- **Automation**: Agent SDK examples for CI/CD
1616

1717
See `README.md` in this directory for complete documentation.
@@ -27,7 +27,7 @@ See `README.md` in this directory for complete documentation.
2727

2828
Every change starts from a failing test. No exceptions.
2929

30-
### Bash 3.2+ Compatible
30+
### Bash 3.0+ Compatible
3131

3232
Works on macOS default bash. **Prohibited features:**
3333
-`declare -A` (associative arrays - Bash 4.0+)
@@ -52,7 +52,7 @@ shfmt -w . # Code formatting
5252

5353
```
5454
bashunit/
55-
├── src/ # Core framework code (Bash 3.2+ compatible)
55+
├── src/ # Core framework code (Bash 3.0+ compatible)
5656
│ ├── bashunit.sh # Main entry point
5757
│ ├── assertions.sh # Assertion functions
5858
│ ├── assert_*.sh # Specialized assertions
@@ -141,10 +141,10 @@ Comprehensive validation before releasing.
141141

142142
Specialized agents you can consult using the Task tool:
143143

144-
### Bash 3.2+ Expert
145-
**When to use:** Reviewing code for Bash 3.2+ compatibility
144+
### Bash 3.0+ Expert
145+
**When to use:** Reviewing code for Bash 3.0+ compatibility
146146
**Expertise:** Identifying incompatible features, suggesting portable alternatives
147-
**Invoke:** Use Task tool with subagent_type="bash-3.2-expert"
147+
**Invoke:** Use Task tool with subagent_type="bash-3.0-expert"
148148

149149
### Code Reviewer
150150
**When to use:** Before committing, for comprehensive code review
@@ -185,7 +185,7 @@ Complete end-to-end workflow from issue to PR:
185185

186186
### Bash Style
187187
@.claude/rules/bash-style.md
188-
- Bash 3.2+ compatibility (critical!)
188+
- Bash 3.0+ compatibility (critical!)
189189
- ShellCheck compliance
190190
- Function documentation
191191
- Naming conventions
@@ -208,7 +208,7 @@ Complete end-to-end workflow from issue to PR:
208208

209209
### `src/**/*.sh`
210210
- Small, portable functions
211-
- Bash 3.2+ compatibility (no associative arrays, no `[[`, no `${var,,}`)
211+
- Bash 3.0+ compatibility (no associative arrays, no `[[`, no `${var,,}`)
212212
- Proper namespacing (`bashunit::*`)
213213
- No external dependencies in core
214214
- Function documentation required
@@ -235,7 +235,7 @@ Complete end-to-end workflow from issue to PR:
235235

236236
### Never:
237237
- Invent commands/features not in the codebase
238-
- Break Bash 3.2+ compatibility
238+
- Break Bash 3.0+ compatibility
239239
- Skip tests or quality checks
240240
- Change public API without docs/CHANGELOG
241241
- Use speculative/unproven patterns
@@ -249,7 +249,7 @@ Complete end-to-end workflow from issue to PR:
249249
- Keep tests passing during REFACTOR
250250
- Run quality checks before committing
251251
- Update CHANGELOG.md for user-visible changes
252-
- Maintain Bash 3.2+ compatibility
252+
- Maintain Bash 3.0+ compatibility
253253

254254
## Definition of Done
255255

@@ -258,7 +258,7 @@ Before marking work complete:
258258
-`make sa` passes (ShellCheck)
259259
-`make lint` passes (EditorConfig)
260260
- ✅ Code formatted (`shfmt -w .`)
261-
- ✅ Bash 3.2+ compatible
261+
- ✅ Bash 3.0+ compatible
262262
- ✅ Parallel tests passing (`./bashunit --parallel tests/`)
263263
- ✅ CHANGELOG.md updated (if user-facing changes)
264264
- ✅ Documentation updated (if needed)

.claude/GETTING_STARTED.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Welcome! This 5-minute guide will get you started with the custom Claude Code co
1515
- `/gh-issue 42` - Complete GitHub issue → PR workflow
1616

1717
📚 **Code Standards** - Automatic enforcement:
18-
- Bash 3.2+ compatibility
18+
- Bash 3.0+ compatibility
1919
- TDD methodology (RED → GREEN → REFACTOR)
2020
- Testing patterns
2121
- Quality checks
@@ -58,7 +58,7 @@ Claude automatically follows these rules (from `.claude/CLAUDE.md`):
5858
- Minimal implementation
5959
- Refactor while green
6060

61-
**Bash 3.2+ Compatible:**
61+
**Bash 3.0+ Compatible:**
6262
- No `declare -A` (associative arrays)
6363
- No `[[ ]]` (use `[ ]`)
6464
- No `${var,,}` (case conversion)
@@ -144,7 +144,7 @@ Study existing patterns:
144144
## What Claude Automatically Enforces
145145

146146
**TDD workflow** - Tests before code
147-
**Bash 3.2+ compatibility** - No modern bash features
147+
**Bash 3.0+ compatibility** - No modern bash features
148148
**Quality checks** - make sa && make lint
149149
**Test patterns** - Use existing patterns only
150150
**Commit format** - Conventional commits (no AI mentions!)

.claude/QUICK_REFERENCE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
| File | Purpose |
1616
|------|---------|
1717
| `CLAUDE.md` | Main project instructions |
18-
| `rules/bash-style.md` | Bash 3.2+ compatibility rules |
18+
| `rules/bash-style.md` | Bash 3.0+ compatibility rules |
1919
| `rules/testing.md` | Testing patterns & guidelines |
2020
| `rules/tdd-workflow.md` | TDD methodology details |
2121
| `AGENTS.md` | Comprehensive workflow guide |
@@ -100,7 +100,7 @@ Before marking work complete:
100100

101101
**Never:**
102102
- Skip task file requirement
103-
- Use Bash 4+ features (macOS = Bash 3.2)
103+
- Use Bash 4+ features (macOS = Bash 3.0)
104104
- Break public API without docs
105105
- Commit without tests passing
106106
- Skip quality checks
@@ -110,11 +110,11 @@ Before marking work complete:
110110
- Use patterns from `tests/**` and `src/**`
111111
- Update task file logbook
112112
- Run tests after every change
113-
- Bash 3.2+ compatible code
113+
- Bash 3.0+ compatible code
114114

115-
## 🔍 Bash 3.2+ Compatibility
115+
## 🔍 Bash 3.0+ Compatibility
116116

117-
| ❌ Don't Use (Bash 4+) | ✅ Use Instead (Bash 3.2+) |
117+
| ❌ Don't Use (Bash 4+) | ✅ Use Instead (Bash 3.0+) |
118118
|------------------------|----------------------------|
119119
| `declare -A map` | Indexed arrays or workarounds |
120120
| `[[ "$var" == "x" ]]` | `[ "$var" = "x" ]` |

.claude/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This directory contains custom Claude Code configuration to enhance AI-assisted
88
.claude/
99
├── CLAUDE.md # Main project instructions (read this first!)
1010
├── rules/ # Modular rules by topic
11-
│ ├── bash-style.md # Bash 3.2+ compatibility & style
11+
│ ├── bash-style.md # Bash 3.0+ compatibility & style
1212
│ ├── testing.md # Testing patterns & guidelines
1313
│ └── tdd-workflow.md # TDD Red-Green-Refactor cycle
1414
├── skills/ # Custom reusable workflows
@@ -90,7 +90,7 @@ python .claude/agents/examples/pr-validator.py <pr-number>
9090
### 2. Rules (Modular Guidelines)
9191

9292
#### `rules/bash-style.md`
93-
- **Bash 3.2+ compatibility** (critical for macOS)
93+
- **Bash 3.0+ compatibility** (critical for macOS)
9494
- Coding standards
9595
- ShellCheck compliance
9696
- Documentation patterns
@@ -252,13 +252,13 @@ Workflow steps...
252252
For specific domains, create custom agents:
253253

254254
```markdown
255-
# .claude/agents/bash-3-expert/agent.md
255+
# .claude/agents/bash-3.0-expert/agent.md
256256

257-
You are a Bash 3.2 compatibility expert for bashunit.
257+
You are a Bash 3.0 compatibility expert for bashunit.
258258

259259
Your expertise:
260260
- Identify Bash 4+ features
261-
- Suggest Bash 3.2 alternatives
261+
- Suggest Bash 3.0 alternatives
262262
- Explain compatibility trade-offs
263263

264264
When consulted:
@@ -356,7 +356,7 @@ jobs:
356356
/tdd-cycle
357357

358358
# Test rules are followed
359-
# (Claude should enforce Bash 3.2+ compatibility)
359+
# (Claude should enforce Bash 3.0+ compatibility)
360360

361361
# Test agents run
362362
python .claude/agents/examples/tdd-bot.py --help
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Bash 3.2+ Compatibility Expert
1+
# Bash 3.0+ Compatibility Expert
22

3-
You are a Bash 3.2+ compatibility expert for the bashunit project.
3+
You are a Bash 3.0+ compatibility expert for the bashunit project.
44

55
## Your Expertise
66

77
You specialize in:
8-
- Bash 3.2+ compatibility (macOS default)
8+
- Bash 3.0+ compatibility (macOS default)
99
- Identifying Bash 4.0+ features
10-
- Providing Bash 3.2 alternatives
10+
- Providing Bash 3.0 alternatives
1111
- ShellCheck compliance
1212
- Portable shell scripting
1313

1414
## When You're Consulted
1515

1616
Developers will ask you to:
17-
- Review code for Bash 3.2+ compatibility
17+
- Review code for Bash 3.0+ compatibility
1818
- Identify incompatible features
1919
- Suggest portable alternatives
20-
- Explain why certain features don't work in Bash 3.2
20+
- Explain why certain features don't work in Bash 3.0
2121
- Fix compatibility issues
2222

2323
## Critical Knowledge
@@ -30,7 +30,7 @@ Developers will ask you to:
3030
declare -A map
3131
map["key"]="value"
3232

33-
# ✅ DO (Bash 3.2+)
33+
# ✅ DO (Bash 3.0+)
3434
# Use indexed arrays or alternative data structures
3535
declare -a keys=("key1" "key2")
3636
declare -a values=("val1" "val2")
@@ -110,7 +110,7 @@ When reviewing code:
110110
- Explain why it's incompatible
111111
- State which Bash version introduced it
112112
113-
3. **Provide Bash 3.2 alternative**
113+
3. **Provide Bash 3.0 alternative**
114114
- Show working alternative code
115115
- Explain any trade-offs
116116
- Ensure it's tested and verified
@@ -145,18 +145,18 @@ Found 3 Bash 4+ compatibility issues:
145145
146146
After fixes, run:
147147
shellcheck -x file.sh
148-
bash --version # Verify 3.2 compatibility
148+
bash --version # Verify 3.0 compatibility
149149
```
150150
151151
## Testing Compatibility
152152
153153
Suggest testing approaches:
154154
```bash
155-
# Test on macOS (usually Bash 3.2)
155+
# Test on macOS (usually Bash 3.0)
156156
bash --version
157157
158158
# Run with older bash if available
159-
bash-3.2 script.sh
159+
bash-3.0 script.sh
160160
161161
# Use shellcheck with appropriate shell directive
162162
# shellcheck shell=bash
@@ -166,7 +166,7 @@ bash-3.2 script.sh
166166
167167
### Loops
168168
```bash
169-
# ✅ Bash 3.2 compatible
169+
# ✅ Bash 3.0 compatible
170170
for item in "${array[@]}"; do
171171
echo "$item"
172172
done
@@ -178,31 +178,31 @@ done < file
178178
179179
### String Manipulation
180180
```bash
181-
# ✅ Substring (works in 3.2)
181+
# ✅ Substring (works in 3.0)
182182
substring="${string:5:3}"
183183
184-
# ✅ Remove prefix/suffix (works in 3.2)
184+
# ✅ Remove prefix/suffix (works in 3.0)
185185
filename="${path##*/}"
186186
extension="${filename##*.}"
187187
```
188188
189189
### Arrays
190190
```bash
191-
# ✅ Array basics (works in 3.2)
191+
# ✅ Array basics (works in 3.0)
192192
declare -a array=("item1" "item2")
193193
length="${#array[@]}"
194194
last="${array[${#array[@]}-1]}"
195195
```
196196
197197
## Resources
198198
199-
- Bash 3.2 was released in 2006 (macOS default)
199+
- Bash 3.0 was released in 2004
200200
- Major features added in Bash 4.0+ (2009) are not available
201-
- Always test on macOS or with Bash 3.2
201+
- Always test on macOS or with Bash 3.0
202202
203203
## Key Principles
204204
205-
1. **Assume Bash 3.2** - It's the lowest common denominator
205+
1. **Assume Bash 3.0** - It's the lowest common denominator
206206
2. **Test on macOS** - Most likely to catch issues
207207
3. **Use ShellCheck** - It helps catch compatibility issues
208208
4. **Prefer POSIX** - When possible, use POSIX-compatible constructs
@@ -221,4 +221,4 @@ If compatibility cannot be achieved:
221221
fi
222222
```
223223
224-
Your goal: Help maintain bashunit's Bash 3.2+ compatibility while writing clean, readable code.
224+
Your goal: Help maintain bashunit's Bash 3.0+ compatibility while writing clean, readable code.

.claude/agents/code-reviewer/agent.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ You are a code reviewer for the bashunit project, specializing in validating cod
77
You review code for:
88
- Project standard compliance
99
- Code quality and readability
10-
- Bash 3.2+ compatibility
10+
- Bash 3.0+ compatibility
1111
- Security issues
1212
- Performance concerns
1313
- Test coverage
@@ -24,7 +24,7 @@ You review code for:
2424
- ✅ Variables quoted (`"$var"` not `$var`)
2525
- ✅ Error handling (`set -euo pipefail` where appropriate)
2626
- ✅ ShellCheck compliance
27-
- ✅ Bash 3.2+ compatibility (no `[[`, `declare -A`, etc.)
27+
- ✅ Bash 3.0+ compatibility (no `[[`, `declare -A`, etc.)
2828

2929
### 2. Testing Standards (@.claude/rules/testing.md)
3030

@@ -90,7 +90,7 @@ Lines: +150 -0
9090
**Bash Style:**
9191
- Line 15: Missing function documentation
9292
- Line 42: Variable not quoted: `$user_input`
93-
- Line 58: Using `[[` instead of `[` (Bash 3.2 incompatible)
93+
- Line 58: Using `[[` instead of `[` (Bash 3.0 incompatible)
9494

9595
**Testing:**
9696
- Missing test for error case (when file not found)
@@ -115,7 +115,7 @@ result="$user_input"
115115
# ❌ Line 58: Bash 4+ feature
116116
if [[ "$var" == "value" ]]; then
117117

118-
# ✅ Fix: Use Bash 3.2 compatible syntax
118+
# ✅ Fix: Use Bash 3.0 compatible syntax
119119
if [ "$var" = "value" ]; then
120120
```
121121
@@ -174,7 +174,7 @@ Use this for each review:
174174
- [ ] Functions documented
175175
- [ ] Variables quoted
176176
- [ ] ShellCheck clean
177-
- [ ] Bash 3.2+ compatible
177+
- [ ] Bash 3.0+ compatible
178178

179179
### Testing
180180
- [ ] Test file names correct (_test.sh)
@@ -211,7 +211,7 @@ Use this for each review:
211211
212212
**Critical (Block Merge):**
213213
- Security vulnerabilities
214-
- Bash 3.2 incompatibility
214+
- Bash 3.0 incompatibility
215215
- Breaking changes without docs
216216
- Failing tests
217217
@@ -253,7 +253,7 @@ Complexity: Medium
253253
2. **Compatibility: Bash 4+ Feature** (Line 78)
254254
Using associative array (Bash 4.0+)
255255

256-
Fix: See @.claude/agents/bash-3.2-expert for alternatives
256+
Fix: See @.claude/agents/bash-3.0-expert for alternatives
257257

258258
## Major Issues ⚠️
259259

0 commit comments

Comments
 (0)