Open Orchestrator provides shell completion for bash, zsh, and fish shells, enabling tab completion for commands, options, and worktree names.
Quick Install
bash
owt completion installFollow the displayed instructions for your shell.
Bash
Generate Script
bash
owt completion bashInstall
Add to ~/.bashrc:
bash
eval "$(owt completion bash)"Or save to a file:
bash
owt completion bash > ~/.local/share/bash-completion/completions/owtReload
bash
source ~/.bashrcZsh
Generate Script
bash
owt completion zshInstall
Add to ~/.zshrc:
bash
eval "$(owt completion zsh)"Or save to completions directory:
bash
owt completion zsh > ~/.zfunc/_owtMake sure ~/.zfunc is in your fpath:
bash
# In ~/.zshrc before compinit
fpath=(~/.zfunc $fpath)
autoload -Uz compinit && compinitReload
bash
source ~/.zshrcFish
Generate Script
bash
owt completion fishInstall
Save to completions directory:
bash
owt completion fish > ~/.config/fish/completions/owt.fishReload
Completions are loaded automatically in new shells.
What Gets Completed
Commands
bash
owt <TAB>
# new list switch delete cleanup sync send merge ...Options
bash
owt new --<TAB>
# --ai-tool --template --base ...Worktree Names
bash
owt switch <TAB>
# feature/auth feature/api bugfix/login ...
owt send <TAB>
# feature/auth feature/api bugfix/login ...Branch Names
bash
owt create <TAB>
# feature/new bugfix/issue-123 main develop ...Custom Completions
Adding Worktree Completion
The completion scripts automatically complete worktree names from:
bash
owt list --json | jq -r '.worktrees[].name'Extending Completions
For custom extensions, modify the generated script:
bash
owt completion bash > ~/my-owt-completion.bash
# Edit the file
source ~/my-owt-completion.bashTroubleshooting
Completions Not Working
Verify script is loaded:
bashtype _owt_completion # bashCheck shell config:
bashcat ~/.bashrc | grep owtReload shell:
bashexec bash # or zsh, fish
Slow Completions
If completions are slow, it may be due to worktree listing. Check:
bash
time owt list --jsonIf slow, check for:
- Large number of worktrees
- Network-mounted git repos
Zsh Completion Issues
Ensure compinit is called after adding to fpath:
bash
fpath=(~/.zfunc $fpath)
autoload -Uz compinit
compinitFish Completion Issues
Verify file location:
bash
ls ~/.config/fish/completions/owt.fishInstallation Script
For automated setup:
bash
#!/bin/bash
# install-completion.sh
SHELL_NAME=$(basename "$SHELL")
case "$SHELL_NAME" in
bash)
owt completion bash >> ~/.bashrc
echo "Added to ~/.bashrc. Run: source ~/.bashrc"
;;
zsh)
mkdir -p ~/.zfunc
owt completion zsh > ~/.zfunc/_owt
echo "Saved to ~/.zfunc/_owt"
echo "Add to ~/.zshrc: fpath=(~/.zfunc \$fpath)"
;;
fish)
mkdir -p ~/.config/fish/completions
owt completion fish > ~/.config/fish/completions/owt.fish
echo "Saved to ~/.config/fish/completions/owt.fish"
;;
*)
echo "Unknown shell: $SHELL_NAME"
exit 1
;;
esac