devo autocomplete¶
Setup shell autocomplete for Devo CLI.
Synopsis¶
Description¶
Detects your shell and shows/installs shell autocomplete. By default, shows instructions for manual setup. Use --install to automatically add autocomplete to your shell config.
Options¶
| Option | Short | Description |
|---|---|---|
--install |
-i |
Automatically install autocomplete to shell config |
--yes |
-y |
Skip confirmation prompt when installing |
--help |
Show help message and exit |
Supported Shells¶
- bash - Bourne Again Shell
- zsh - Z Shell
- fish - Friendly Interactive Shell
The command automatically detects your current shell.
Usage¶
Show Instructions (Default)¶
Shows manual installation instructions for your shell.
Automatic Installation¶
# Install with confirmation
devo autocomplete --install
# Install without confirmation
devo autocomplete --install --yes
The command will:
- Detect your shell
- Add autocomplete configuration to your shell config file
- Show instructions to reload your shell
Installation Details¶
Bash¶
Adds to ~/.bashrc:
Reload:
Zsh¶
Adds to ~/.zshrc:
Reload:
Fish¶
Adds to ~/.config/fish/completions/devo.fish:
Reload:
Examples¶
Basic Usage¶
After Installation¶
# Type 'devo ' and press TAB
devo <TAB>
# Shows available commands:
autocomplete aws-login code-reviewer commit config ...
# Type 'devo aws-login ' and press TAB
devo aws-login <TAB>
# Shows subcommands:
configure list login refresh set-default
Features¶
- Auto-detection: Automatically detects your shell
- Safe Installation: Checks if already installed before adding
- Multiple Shells: Supports bash, zsh, and fish
- Command Completion: Complete command names
- Option Completion: Complete option flags
- Argument Completion: Complete file paths and values
Troubleshooting¶
Completion not working after installation¶
Solution: Reload your shell configuration:
# Bash
source ~/.bashrc
# Zsh
source ~/.zshrc
# Fish
source ~/.config/fish/config.fish
# Or restart your terminal
"Command not found: _DEVO_COMPLETE"¶
Solution: Ensure Devo CLI is in your PATH:
Completion shows old commands¶
Solution: Reinstall autocomplete:
Manual Installation¶
If automatic installation doesn't work, you can manually add the completion code:
Bash¶
Edit ~/.bashrc:
Zsh¶
Edit ~/.zshrc:
Fish¶
Create ~/.config/fish/completions/devo.fish:
Exit Codes¶
| Code | Description |
|---|---|
| 0 | Success |
| 1 | Error (unsupported shell, installation failed, etc.) |
See Also¶
- Shell Completion Guide - Detailed setup guide
- Installation - Install Devo CLI
Notes¶
- Requires Devo CLI to be installed and in PATH
- Completion is powered by Click framework
- Works with all Devo CLI commands and options
- Updates automatically when new commands are added