CodexWrapper.Commands.Completion (CodexWrapper v0.4.0)

Copy Markdown View Source

Shell completion script generation.

Wraps codex completion [SHELL] to generate shell-specific completion scripts.

Summary

Functions

Generate a shell completion script.

Types

shell()

@type shell() :: :bash | :zsh | :fish | :elvish | :powershell

Functions

generate(config, shell \\ :bash)

@spec generate(CodexWrapper.Config.t(), shell()) ::
  {:ok, String.t()} | {:error, term()}

Generate a shell completion script.

Examples

config = CodexWrapper.Config.new()
{:ok, script} = CodexWrapper.Commands.Completion.generate(config)
{:ok, script} = CodexWrapper.Commands.Completion.generate(config, :zsh)