View Source mix do_it.gen.completion (do_it v0.7.0)

Generates shell completion scripts for your DoIt CLI application.

This task helps you generate completion scripts for popular shells and optionally save them to appropriate locations.

Usage

mix do_it.gen.completion [options]

Options

  • --shell (-s) - Shell to generate completion for (bash, fish, zsh)
  • --output (-o) - Output file path (defaults to stdout)
  • --install (-i) - Show installation instructions instead of generating script
  • --main-module (-m) - Main module to use (auto-detected if not specified)
  • --app-name (-a) - Application name (defaults to app name from mix.exs)

Examples

# Generate bash completion script to stdout
mix do_it.gen.completion --shell bash

# Generate fish completion and save to file
mix do_it.gen.completion --shell fish --output ~/.config/fish/completions/myapp.fish

# Show installation instructions for zsh
mix do_it.gen.completion --shell zsh --install

# Generate for specific main module
mix do_it.gen.completion --shell bash --main-module MyApp.CLI

Summary

Functions

Callback implementation for Mix.Task.run/1.

Functions

Callback implementation for Mix.Task.run/1.