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

# [NAME](#NAME)

cmdliner-install-tool-completion - Install tool completion scripts

# [SYNOPSIS](#SYNOPSIS)

**cmdliner install tool-completion** \[*OPTION*]… *TOOLNAME*… *SHAREDIR*

# [DESCRIPTION](#DESCRIPTION)

**cmdliner install tool-completion** installs tool completion script of given tools and shells in a **share** directory according to specific shell conventions. Directories are created if needed. Use option **--dry-run** to see which paths would be written. Example:

```
cmdliner install tool-completion mytool /usr/local/share  # All supported shells
```

```
cmdliner install tool-completion --shell zsh mytool /usr/local/share
```

Note that the command **install tool-support** also installs completions like this command does. To inspect the actual scripts use the command **tool-completion**.

# [ARGUMENTS](#ARGUMENTS)

[*SHAREDIR* (required)](#SHAREDIR)

*SHAREDIR* is the **share** directory to install to.

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

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

# [OPTIONS](#OPTIONS)

[**--dry-run**](#dry)

Do not install, output paths that would be written.

[**-s** *SHELL*, **--shell**=*SHELL* (absent=All supported shells)](#s)

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

[**--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.

[**--update-opam-install**=*PKG.install*](#update)

Update or create an opam **.install** file *PKG.install* with install moves from the installed files to the corresponding opam install sections. Also performed if **--dry-run** is specified.

# [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 install 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-install-tool-completion(1) from ocaml4-cmdliner 2.1.1-r2 (Chainguard OS)
Source: https://github.com/dbuenzli/cmdliner
