# completions

URL: /milo-cli/api/milo/completions/
Section: milo
Description: Shell completion generation for bash, zsh, fish, and PowerShell.

---

> For a complete page index, fetch /milo-cli/llms.txt.

Open LLM text
(/milo-cli/api/milo/completions/index.txt)

Share with AI

Ask Claude
(https://claude.ai/new?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Fcompletions%2Findex.txt)

Ask ChatGPT
(https://chatgpt.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Fcompletions%2Findex.txt)

Ask Gemini
(https://gemini.google.com/app?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Fcompletions%2Findex.txt)

Ask Copilot
(https://copilot.microsoft.com/?q=Please%20help%20me%20understand%20this%20documentation%3A%20%2Fmilo-cli%2Fapi%2Fmilo%2Fcompletions%2Findex.txt)

Module

#
`completions`

Shell completion generation for bash, zsh, fish, and PowerShell.

6Functions

## Functions

`generate_bash_completion`

1

`str`

▼

Generate bash completion script.

`def generate_bash_completion(cli: CLI) -> str`

##### Parameters

Name
Type
Description

`cli`
`CLI`

##### Returns

`str`

`generate_zsh_completion`

1

`str`

▼

Generate zsh completion script.

`def generate_zsh_completion(cli: CLI) -> str`

##### Parameters

Name
Type
Description

`cli`
`CLI`

##### Returns

`str`

`generate_fish_completion`

1

`str`

▼

Generate fish completion script.

`def generate_fish_completion(cli: CLI) -> str`

##### Parameters

Name
Type
Description

`cli`
`CLI`

##### Returns

`str`

`generate_powershell_completion`

1

`str`

▼

Generate PowerShell completion script.

`def generate_powershell_completion(cli: CLI) -> str`

##### Parameters

Name
Type
Description

`cli`
`CLI`

##### Returns

`str`

`_collect_completions`

1

`dict[str, dict[str, Any]]`

▼

Collect command names, flags, and descriptions for completions.

`def _collect_completions(cli: CLI) -> dict[str, dict[str, Any]]`

##### Parameters

Name
Type
Description

`cli`
`CLI`

##### Returns

`dict[str, dict[str, Any]]`

`install_completions`

2

`str`

▼

Generate completion script for the specified shell.

If shell is empty, auto-de…

`def install_completions(cli: CLI, shell: str = '') -> str`

Generate completion script for the specified shell.

If shell is empty, auto-detects from $SHELL.

##### Parameters

Name
Type
Description

`cli`
`CLI`

`shell`
`str`

Default:`''`

##### Returns

`str`
