feat: add shell completions (bash, zsh, fish)#4943
Conversation
Adds static completion scripts under shell-completions/:
- claude-completions.bash
- claude-completions.zsh
- claude-completions.fish
Note: If the claude binary supported integrated completions,
users would simply be able to run:
source <(claude completion $SHELL)
as is common in many modern CLI tools.
Unfortunately, upstream integration isn’t possible
the client is not open source.
d8cb78c to
8a0febd
Compare
|
Would be good if the team took 3 minutes to run claude code on their project to make these into upstream. xoxox |
|
Hi @gitmpr, thanks for working on shell completions for Claude Code! I've also been working on a Zsh completion script and wanted to share it in case it's helpful: Some features that might be worth considering:
Feel free to use any parts of it if you find them useful. I'm happy to collaborate or contribute if needed. |
|
Cross-linking #62455 for visibility — it's a fresh feature request for tab completion inside bash mode (the That's a different layer than this PR (which adds completion for the external |

Adds static completion scripts for tab autocompletion under shell-completions/:
Note: If the claude binary supported integrated completions, users would simply be able to run:
as is common in many modern CLI tools.
Unfortunately, upstream integration isn’t possible. The client is not open source.