Cheer.Completion (Cheer v0.1.5)

Copy Markdown View Source

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

Generates completion scripts from the command tree metadata.

Usage

# Generate and print to stdout
Cheer.Completion.generate(MyApp.CLI.Root, :bash, prog: "my-app")
Cheer.Completion.generate(MyApp.CLI.Root, :zsh, prog: "my-app")
Cheer.Completion.generate(MyApp.CLI.Root, :fish, prog: "my-app")
Cheer.Completion.generate(MyApp.CLI.Root, :powershell, prog: "my-app")

Summary

Functions

Generate a shell completion script for the given command tree.

Functions

generate(root, shell, opts \\ [])

@spec generate(module(), :bash | :zsh | :fish | :powershell, keyword()) :: String.t()

Generate a shell completion script for the given command tree.

Options:

  • :prog - program name (required)