Module: Kotoshu::Cli::Completions

Defined in:
lib/kotoshu/cli/completions_command.rb

Overview

Catalog of commands the completion scripts know about, plus pure template builders that render shell-specific scripts from the catalog. Kept in a single module so the data and the rendering logic live next to the Thor subcommand that exposes them.

Defined Under Namespace

Modules: ScriptBuilders Classes: Command

Constant Summary collapse

COMMANDS =

Top-level commands the bash/zsh/fish scripts will offer. Kept as a static catalog — descriptions are user-facing, so they are curated here rather than introspected from Thor (whose description field is often terse).

[
  Command.new(name: "check",       description: "Check spelling in a file or stdin"),
  Command.new(name: "setup",       description: "Set up languages (download or register local files)"),
  Command.new(name: "status",      description: "Show setup, cache, and runtime status"),
  Command.new(name: "dict",        description: "Dictionary operations"),
  Command.new(name: "cache",       description: "Cache management"),
  Command.new(name: "completions", description: "Emit shell completion scripts"),
  Command.new(name: "version",     description: "Show version information"),
  Command.new(name: "fetch",       description: "Alias for `setup` (deprecated)")
].freeze
LANGUAGE_ARGUMENT_COMMANDS =

Commands whose first positional argument is a language code.

%w[setup fetch].freeze