Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Pipeline Plan 1

Seth Ford edited this page Feb 8, 2026 · 3 revisions

The plan has been created. Here's a summary:

Implementation Plan: Shell Completion Installation in shipwright init

File to Modify

  • scripts/cct-init.sh — single file change, inserting a new section after the CLAUDE.md blocks (line 275), before the tmux reload section.

Approach

A new # ─── Shell Completions section that:

  1. Detects the current shell from $SHELL
  2. Installs per shell type:
    • zsh: copies _shipwright~/.zsh/completions/, adds fpath to .zshrc if missing
    • bash: copies shipwright.bash/usr/local/etc/bash_completion.d/ (macOS, if writable) or ~/.local/share/bash-completion/completions/ (Linux/fallback)
    • fish: copies shipwright.fish~/.config/fish/completions/
  3. Idempotency via cmp -s — if file already matches, prints "already installed" and skips
  4. Graceful degradation — warns if completions/ dir is missing or shell is unsupported

Key Design Decisions

  • Uses cmp -s for idempotency (Bash 3.2 compatible)
  • Only appends fpath to .zshrc if not already present (grep check)
  • Bash falls back from system-wide dir to user-local dir if not writable
  • All output uses existing info(), success(), warn() helpers
  • No new files created, no test file changes needed

Task Checklist (9 tasks)

Covers: section insertion, per-shell install logic, idempotency, edge cases, test suite verification, and manual smoke test.

Definition of Done

All completions auto-installed for zsh/bash/fish, idempotent, clear messaging, existing tests pass, Bash 3.2 compatible.

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /