---
name: "cmdliner-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-generic-completion"
---

# cmdliner-generic-completion(1)

Output generic completion scripts

## NAME

cmdliner-generic-completion - Output generic completion scripts

## SYNOPSIS

**cmdliner generic-completion** \[*OPTION*\]… *SHELL*

## DESCRIPTION

**cmdliner generic-completion** outputs the generic cmdliner completion script for a given shell. Examples:

```
cmdliner generic-completion zsh
```

```
eval $(cmdliner generic-completion zsh)
```

The script needs to be loaded in a shell for tool specific scripts output by the command **tool-completion** to work. See command **install generic-completion** to install them.

## ARGUMENTS

- *SHELL* (required)

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

## 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 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)
