Skip to main content

Shell Completion

The xyz completion command generates shell completion scripts for faster command entry.

Supported Shells

Installation

Temporary (Current Session)

Permanent (Add to Profile)

Add to ~/.bashrc:

System-Wide

System-wide installation requires root/sudo access.

Usage

After installation, press Tab to complete commands:

Command Completion

Subcommand Completion

Flag Completion

Completion Features

Command Descriptions

With zsh and fish, completions include descriptions:

Dynamic Completions

Some completions are context-aware:

Troubleshooting

Ensure bash-completion is installed:macOS:
Ubuntu/Debian:
Add to ~/.bashrc:
Enable completion system in ~/.zshrc:
Reload:
Remove cached completions and regenerate:Zsh:
Bash:
For system-wide installation:

Verify Installation

Test that completions are working:
If completions work, you’re all set. If not, check the troubleshooting section above.