Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -1039,8 +1039,13 @@ openspec completion install
openspec completion install zsh

# Generate script for manual installation

# Unix/macOS (bash)
openspec completion generate bash > ~/.bash_completion.d/openspec
Comment on lines +1043 to 1044
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Verify the bash completion path works without additional setup.

The path ~/.bash_completion.d/openspec may not work automatically on most systems. The ~/.bash_completion.d/ directory is not typically auto-sourced by bash unless explicitly configured in ~/.bashrc or ~/.bash_profile.

Consider using ~/.bash_completion instead, or document that users must source the directory:

# Add to ~/.bashrc if using ~/.bash_completion.d/
for file in ~/.bash_completion.d/*; do
  [ -r "$file" ] && source "$file"
done

Alternatively, update the example to append to the standard single-file location:

# Unix/macOS (bash)
openspec completion generate bash >> ~/.bash_completion
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/cli.md` around lines 1043 - 1044, The example uses a non-standard path
(~/.bash_completion.d/openspec) that isn't auto-sourced by bash on most systems;
update the docs for the "openspec completion generate bash" example to either
direct users to append to the common single-file location (~/.bash_completion)
or add a short note and the sourcing snippet that instructs users to source
~/.bash_completion.d/* from their ~/.bashrc/~/.bash_profile so the generated
file is actually loaded.


# Windows (PowerShell)
openspec completion generate powershell >> $PROFILE

# Uninstall
openspec completion uninstall
```
Expand Down
Loading