Class: Agent::Lock::CLI::Commands::Completion
- Inherits:
-
Dry::CLI::Autocomplete::Command
- Object
- Dry::CLI::Autocomplete::Command
- Agent::Lock::CLI::Commands::Completion
- Defined in:
- lib/agent/lock/cli/commands/completion.rb
Overview
alock completion bash|zsh, from dry-cli-autocomplete.
Upstream binds a registry by subclassing this command, restores
the description and examples dry-cli's inherited hook clears, and
writes to the stream dry-cli hands it. All that is left to say here
is the wording, and where a Homebrew bash keeps its completions.
Class Method Summary collapse
-
.examples_for(name) ⇒ Array<String>
Upstream calls this from inside the subclass it builds, so overriding it here changes the examples
--helpprints.
Class Method Details
.examples_for(name) ⇒ Array<String>
Upstream calls this from inside the subclass it builds, so
overriding it here changes the examples --help prints.
23 24 25 26 27 28 |
# File 'lib/agent/lock/cli/commands/completion.rb', line 23 def self.examples_for(name) [ "bash > \"$(brew --prefix)/etc/bash_completion.d/#{name}\"", "zsh > \"${fpath[1]}/_#{name}\"" ] end |