Shell Completion Guide¶
Enable tab completion for Devo CLI commands in your shell.
Overview¶
Shell completion allows you to:
- Press TAB to autocomplete commands
- See available options and subcommands
- Speed up command entry
- Discover commands interactively
Quick Setup¶
Verification¶
Test completion works:
# Type and press TAB
devo <TAB>
# Should show:
# code-reviewer codeartifact-login commit config upgrade
# Try with options
devo commit --<TAB>
# Should show:
# --add --all --help --pull-request --push
Usage Examples¶
Command Completion¶
devo c<TAB>
# Completes to: devo code-reviewer, commit, config, codeartifact-login
devo co<TAB>
# Shows: code-reviewer codeartifact-login commit config
Option Completion¶
devo commit --<TAB>
# Shows all available options:
# --add --all --help --pull-request --push
devo config <TAB>
# Shows subcommands:
# export import migrate path reset sections set show
Profile Completion¶
If you have AWS profiles configured:
Advanced Configuration¶
Add to ~/.zshrc:
Install bash-completion if needed, then add to ~/.bashrc:
Troubleshooting¶
Completion Not Working¶
- Verify Devo is in PATH:
-
Reload shell configuration:
-
Check completion is loaded:
Slow Completion¶
If completion is slow, generate a static completion file:
Add to ~/.zshrc:
Completion Shows Wrong Commands¶
Clear completion cache:
Permission Denied¶
Ensure the completion directory exists and is writable:
Uninstalling Completion¶
Completion Features¶
Command Completion¶
- Main commands:
commit,code-reviewer,config, etc. - Subcommands:
config show,config set, etc.
Option Completion¶
- Short options:
-a,-p,-pr - Long options:
--add,--push,--pull-request - Global options:
--profile,--help,--version
Argument Completion¶
- AWS profiles (from
~/.aws/config) - Configuration keys (for
config get/set) - File paths (where applicable)
Tips¶
- Double TAB: Press TAB twice to see all options
- Partial Match: Type partial command and TAB to complete
- Help Text: Use
--helpto see all options - Explore: Use TAB to discover available commands