bash-patternslisted
Install: claude install-skill ku5ic/dotfiles
# Bash patterns
Default assumption: bash 5.x targeting macOS (via Homebrew bash) and Linux. Scripts use `#!/usr/bin/env bash` so the resolved binary is whatever is first on PATH, which on the user's machine is the Homebrew 5.x build, not the stock macOS `/bin/bash` 3.2. Anything that requires bash 4.0+ (case modification, `mapfile`, `${parameter@op}`) is unsafe under stock macOS bash and is flagged here when the version cut matters.
## Severity rubric
- `failure`: a concrete defect or violation that should not ship.
- `warning`: a smell or pattern that compounds with other findings.
- `info`: a hardening opportunity or note, not a defect.
## Reference files
| File | Covers |
| -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| [reference/safety-flags.md](reference/safety-flags.md) | Script preamble, `set -euo pipefail` edge cases, `inherit_errexit`, `nullglob`, verification before shipping |
| [reference/quoting.md](reference/quoting.md) | Quoting rules, nested quoting, heredoc indentation, `printf` over `echo`, zsh-vs-bash differences |
| [reference/conditionals.md](reference/conditionals.md) | `[[ ]]` over `[ ]`,