azu completion

Generate shell completion scripts for Azu CLI.

Overview

The completion command generates shell-specific completion scripts that enable tab-completion for Azu CLI commands, options, and arguments.

Usage

azu completion [shell] [options]

Options

Option
Description
Default

--shell, -s

Shell type

(detected)

--help, -h

Show help

-

Supported Shells

  • bash - Bash shell completion

  • zsh - Zsh shell completion

  • fish - Fish shell completion

Installation

Bash

Add to your ~/.bashrc or ~/.bash_profile:

Then reload your shell:

Zsh

Add to your ~/.zshrc:

Then reload your shell:

Fish

Save the completion script to Fish's completion directory:

The completion will be available immediately in new Fish shells.

Features

The completion scripts provide intelligent completion for:

Commands

Press Tab after azu to see all available commands:

Generators

Press Tab after azu generate to see all generator types:

Options

Press Tab after - to see available options:

Option Values

Press Tab after certain options to see valid values:

Examples

Generate Bash Completion

Generate Zsh Completion

Generate Fish Completion

Specify Shell Explicitly

Troubleshooting

Completions Not Working

  1. Ensure the completion script is loaded:

    • Bash: Check ~/.bashrc or /etc/bash_completion.d/

    • Zsh: Check ~/.zshrc

    • Fish: Check ~/.config/fish/completions/

  2. Reload your shell:

  3. Verify Azu is in your PATH:

Shell Detection Failed

If automatic shell detection fails, specify the shell explicitly:

Permission Denied

If you get permission errors writing to system directories:


See Also:

Last updated