Add bash completion for bd (beads) issue tracker

Delegates to Cobra's built-in completion generator via cached_completion,
so the cache auto-regenerates whenever the bd binary is updated.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2026-04-24 17:04:09 +02:00
commit 627bec583e
2 changed files with 4 additions and 0 deletions

3
50-bd-completion Executable file
View file

@ -0,0 +1,3 @@
# shellcheck shell=bash
# Tab completion for bd, the beads issue tracker
cached_completion bd bd completion bash

View file

@ -58,6 +58,7 @@ Lower numbers load first, so foundational pieces like helper functions (`00-`) a
All completions (except `50-claude-completion`) use `cached_completion` to avoid subprocess overhead on every shell start. Cache files live in `~/.cache/bash.d/` and are automatically regenerated when the tool binary is updated.
- **`50-asdf-completion`** — Tab completion for the asdf version manager.
- **`50-bd-completion`** — Tab completion for `bd` (beads), a lightweight issue tracker with first-class dependency support.
- **`50-bun-completion`** — Tab completion for Bun (JavaScript runtime & package manager).
- **`50-claude-completion`** — Tab completion for [Claude Code](https://claude.com/claude-code) CLI.
- **`50-fj-completion`** — Tab completion for the Forgejo CLI (`fj`).