Skip to content
Back to skills

Working With Bash

ASecurity

Use when working with Bash: commands, builtins, shopt/set -o, parameter expansion, [[ ]] vs [ ], globs, redirection, .bashrc/.inputrc, strict mode (set -euo pipefail), quoting bugs, POSIX portability, completion, Readline, or ShellCheck/shfmt/bats. Version-exact manual bundled. For Zsh use working-with-zsh.

  • 2 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added November 13, 2026
documentationgoshellbashtestingdebugginggit

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned November 13, 2026

npx -y skills add joeblackwaslike/agent-skills --skill working-with-bash --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Working With Bash?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Working With Bash
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/joeblackwaslike-working-with-bash/badge)](https://www.skillsdirectory.com/skills/joeblackwaslike-working-with-bash)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: working-with-bash
description: >-
  Use when working with Bash: commands, builtins, shopt/set -o, parameter expansion, [[ ]] vs [ ],
  globs, redirection, .bashrc/.inputrc, strict mode (set -euo pipefail), quoting bugs, POSIX
  portability, completion, Readline, or ShellCheck/shfmt/bats. Version-exact manual bundled. For
  Zsh use working-with-zsh.
metadata:
  last_updated: "2026-06-16"
---

# Working with Bash

Comprehensive, self-updating Bash reference: the **complete official manual** (man page
+ GNU manuals), the **ecosystem** (frameworks, managers, prompts, plugins, quality
tooling), a **community learning corpus**, and hand-written **migration + cookbook guides**.

Four reference buckets, three provenance models:

- **`references/manual/`** — the official Bash reference. Two provenances in one bucket:
  - `bash.md` / `bashbug.md` — generated **verbatim** from the pinned `bash`'s own man
    pages (`man bash`). **Version-exact** to [`PINNED_VERSION`](PINNED_VERSION) (currently
    `bash 5.3.9`). Ground truth for any syntax/option/builtin question, and `grep`-friendly.
  - `bash-reference-manual.md`, `readline.md`, `history.md` — the GNU **Bash Reference
    Manual**, **Readline**, and **History** manuals, **snapshot-fetched** from gnu.org /
    Chet Ramey's site. Bash ships ONE monolithic man page, so these add the readable,
    chapter-organized view (and Readline/History detail the man page only summarizes).
- **`references/ecosystem/`** — upstream READMEs for the tooling ecosystem (oh-my-bash,
  bash-it, basher, bpkg, bash-completion, ble.sh, prompts, fzf/zoxide, ShellCheck, shfmt,
  bats-core). **Snapshot-fetched**; refreshed weekly by CI.
- **`references/learn/`** — the community learning corpus (BashFAQ, BashGuide,
  BashPitfalls, Chet's FAQ, pure-bash-bible, bash-handbook, Google Shell Style Guide,
  the POSIX shell spec). **Snapshot-fetched.**
- **`references/guides/`** — hand-written value-add: orientation, Bash↔Zsh / Bash↔POSIX
  migration, framework/manager/prompt comparisons, a cookbook, and a pitfalls/safety guide.

## When to use

- Any `bash` command, builtin, `shopt`/`set -o` option, special variable, parameter
  expansion, `[[ ]]` test operator, glob (`extglob`/`globstar`), or redirection lookup.
- Writing or fixing `.bashrc` / `.bash_profile` / `.profile` / `.inputrc`; understanding
  startup-file order (login vs interactive vs non-interactive).
- Making a script safe (`set -euo pipefail`, quoting, word-splitting) or portable
  (Bash → POSIX `sh`), or debugging a script that misbehaves.
- Bash → Zsh migration, or vice-versa.
- Choosing a framework (oh-my-bash / bash-it), a package/plugin manager (basher / bpkg),
  a prompt (Starship / Oh My Posh / Powerline / bash-git-prompt / liquidprompt), or
  readline enhancers (ble.sh / bash-preexec).
- Programmable completion (`complete`, `compgen`, bash-completion) or Readline bindings.
- Linting/formatting/testing scripts (ShellCheck, shfmt, bats-core).

## Quick reference

| I need to… | Read |
| --- | --- |
| Orient / find the right doc fast | [`references/guides/overview.md`](references/guides/overview.md) |
| Migrate Bash↔Zsh, or make a script POSIX-portable | [`references/guides/bash-vs-zsh.md`](references/guides/bash-vs-zsh.md) |
| Choose/compare a framework or package manager | [`references/guides/frameworks-and-managers.md`](references/guides/frameworks-and-managers.md) |
| Choose/compare a prompt | [`references/guides/prompts.md`](references/guides/prompts.md) |
| Practical recipes (arrays, expansion, globbing, traps, completion, history) | [`references/guides/cookbook.md`](references/guides/cookbook.md) |
| Avoid quoting/word-splitting bugs; write safe scripts | [`references/guides/pitfalls-and-safety.md`](references/guides/pitfalls-and-safety.md) |
| The full shell reference (grammar, expansion, builtins, variables) | [`references/manual/bash.md`](references/manual/bash.md) |
| The same, organized as readable prose | [`references/manual/bash-reference-manual.md`](references/manual/bash-reference-manual.md) |
| Readline: key bindings, `.inputrc`, editing modes | [`references/manual/readline.md`](references/manual/readline.md) |
| History expansion (`!!`, `!$`, `^old^new`) and config | [`references/manual/history.md`](references/manual/history.md) |
| Common bash mistakes (the canonical BashPitfalls list) | [`references/learn/bashpitfalls.md`](references/learn/bashpitfalls.md) |
| Greg's BashFAQ / BashGuide (linked externally — fragile wiki) | [`references/guides/pitfalls-and-safety.md`](references/guides/pitfalls-and-safety.md) |
| Pure-bash idioms (no external processes) | [`references/learn/pure-bash-bible.md`](references/learn/pure-bash-bible.md) |
| Style conventions | [`references/learn/google-shell-style-guide.md`](references/learn/google-shell-style-guide.md) |
| POSIX portability ground truth | [`references/learn/posix-shell-spec.md`](references/learn/posix-shell-spec.md) |
| A specific framework/manager/prompt/tool README | `references/ecosystem/<name>__readme.md` |

## How to use

1. **Syntax / behavior questions** → start in [`references/manual/bash.md`](references/manual/bash.md)
   (verbatim, version-exact, `grep`-friendly). For a readable walk-through of the same
   material, use [`bash-reference-manual.md`](references/manual/bash-reference-manual.md).
2. **"How do I…" / recipes** → [`references/guides/cookbook.md`](references/guides/cookbook.md)
   first, then the relevant manual section.
3. **A script breaks or behaves surprisingly** → [`references/guides/pitfalls-and-safety.md`](references/guides/pitfalls-and-safety.md)
   and [`references/learn/bashpitfalls.md`](references/learn/bashpitfalls.md); run it through ShellCheck.
4. **Portability / migration** → [`references/guides/bash-vs-zsh.md`](references/guides/bash-vs-zsh.md)
   (covers Bash↔Zsh and Bash↔POSIX `sh`).
5. **Tooling choices** → [`references/guides/frameworks-and-managers.md`](references/guides/frameworks-and-managers.md)
   and [`prompts.md`](references/guides/prompts.md); the matching `references/ecosystem/*__readme.md`
   has the upstream detail.

## Maintenance

- [`scripts/update_docs.js`](scripts/update_docs.js) regenerates `references/manual/`'s
  man pages from the pinned `bash` (graceful skip when bash is absent or != the pin), and
  re-fetches the GNU manuals, `references/ecosystem/`, and `references/learn/`. Run via
  `make update-working-with-bash`.
- Each reference file carries `source` / `fetched_at` / `sha256` frontmatter; `fetched_at`
  only advances when upstream content actually changes. The weekly CI action refreshes the
  fetched docs; the version-exact man pages only regenerate when the pin is bumped locally.
- `references/guides/*` are hand-written and **not** touched by the update script.

## Related skills

- `working-with-zsh` — the Zsh counterpart (same manual/ecosystem/guides pattern); pair
  them for cross-shell questions.
- `working-with-git` — git itself (the manual/cookbook pattern mirrors it).
- `agent-instructions` — authoring shell/agent config files.
- `authoring-agent-skills` — the doc-wrapper + freshness conventions this skill follows.

Files in this skill

  • PINNED_VERSION11 B
  • SKILL.md7.1 KB
  • references/ecosystem/autojump__readme.md4.6 KB
  • references/ecosystem/awesome-bash.md14.6 KB
  • references/ecosystem/bash-completion__readme.md19 KB
  • references/ecosystem/bash-git-prompt__readme.md15 KB
  • references/ecosystem/bash-it__readme.md5 KB
  • references/ecosystem/bash-it__themes.md2.6 KB
  • references/ecosystem/bash-preexec__readme.md5.1 KB
  • references/ecosystem/basher__readme.md5.7 KB
  • references/ecosystem/bats-core__readme.md5 KB
  • references/ecosystem/blesh__readme.md45.4 KB
  • references/ecosystem/bpkg__readme.md13.1 KB
  • references/ecosystem/direnv__readme.md8.2 KB
  • references/ecosystem/fzf__readme.md41.9 KB
  • references/ecosystem/liquidprompt__readme.md3.8 KB
  • references/ecosystem/oh-my-bash__readme.md12.4 KB
  • references/ecosystem/oh-my-bash__themes.md10.7 KB
  • references/ecosystem/oh-my-posh__readme.md4.8 KB
  • references/ecosystem/powerline__readme.md5.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.