Cheer.Completion (Cheer v0.1.3)

Copy Markdown View Source

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

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

Summary

Functions

Generate a shell completion script for the given command tree.

Functions

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

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

Generate a shell completion script for the given command tree.

Options:

  • :prog - program name (required)