---
name: "cmdliner-install-generic-completion"
section: "1"
platform: "linux"
package: "ocaml-cmdliner"
version: "2.1.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/cmdliner-install-generic-completion"
---

# cmdliner-install-generic-completion(1)

Install generic completion scripts

## NAME

cmdliner-install-generic-completion - Install generic completion scripts

## SYNOPSIS

**cmdliner install generic-completion** \[**--dry-run**\] \[**--shell**=*SHELL*\] \[**--update-opam-install**=*PKG.install*\] \[*OPTION*\]… *SHAREDIR*

## DESCRIPTION

**cmdliner install generic-completion** installs the generic completion script of given 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. Examples:

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

```
cmdliner install generic-completion --shell zsh /usr/local/share
```

To inspect the actual scripts use the command **generic-completion**.

## ARGUMENTS

- *SHAREDIR* (required)

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

## OPTIONS

- **--dry-run**

  Do not install, output paths that would be written.

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

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

- **--update-opam-install**=*PKG.install*

  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

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

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

  Show version information.

## EXIT STATUS

**cmdliner install generic-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

[cmdliner(1)](/cmdliner/1.md)
