CMDLINER-TOOL-COMPLETION(1) Cmdliner Manual CMDLINER-TOOL-COMPLETION(1)

# [NAME](#NAME)

cmdliner-tool-completion - Output tool completion scripts

# [SYNOPSIS](#SYNOPSIS)

**cmdliner tool-completion** \[**--standalone-completion**] \[*OPTION*]… *SHELL* *TOOLNAME*

# [DESCRIPTION](#DESCRIPTION)

**cmdliner tool-completion** outputs the tool specific completion script of a given shell. Example:

```
cmdliner tool-completion zsh mytool
```

Note that tool specific completion script need the corresponding generic completion script output by **generic-completion** to be loaded in the shell. To install these scripts see command **install tool-completion**.

# [ARGUMENTS](#ARGUMENTS)

[*SHELL* (required)](#SHELL)

*SHELL* the shell to support, must be one of **bash**, **zsh** or **pwsh**.

[*TOOLNAME* (required)](#TOOLNAME)

*TOOLNAME* is the name of the tool to complete.

# [OPTIONS](#OPTIONS)

[**--standalone-completion**](#standalone)

Generate standalone completion scripts. These scripts do not depend on the generic cmdliner completion scripts. For some shells this may result in slower completion.

# [COMMON OPTIONS](#COMMON_OPTIONS)

[**--help**\[=*FMT*\] (default=**auto**)](#help)

Show this help in format *FMT*. The value *FMT* must be one of **auto**, **pager**, **groff** or **plain**. With **auto**, the format is **pager** or **plain** whenever the **TERM** env var is **dumb** or undefined.

[**--version**](#version)

Show version information.

# [EXIT STATUS](#EXIT_STATUS)

**cmdliner tool-completion** exits with:

0

on success.

123

on indiscriminate errors reported on standard error.

124

on command line parsing errors.

125

on unexpected internal errors (bugs).

# [SEE ALSO](#SEE_ALSO)

[cmdliner(1)](/man/enterprise-packages/ocaml4-cmdliner/cmdliner.1)

Cmdliner %%VERSION%%

---

Document: cmdliner-tool-completion(1) from ocaml4-cmdliner 2.1.1-r2 (Chainguard OS)
Source: https://github.com/dbuenzli/cmdliner
