https://github.com/postmodern/command_kit-completion
Generate shell completions for command_kit commands
https://github.com/postmodern/command_kit-completion
bash-completion bash-completions cli command-kit ruby shell-completion zsh-completion zsh-completions
Last synced: 3 days ago
JSON representation
Generate shell completions for command_kit commands
- Host: GitHub
- URL: https://github.com/postmodern/command_kit-completion
- Owner: postmodern
- License: mit
- Created: 2023-12-16T02:31:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-16T08:51:23.000Z (6 months ago)
- Last Synced: 2025-04-18T03:03:17.524Z (2 months ago)
- Topics: bash-completion, bash-completions, cli, command-kit, ruby, shell-completion, zsh-completion, zsh-completions
- Language: Ruby
- Homepage:
- Size: 58.6 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# command_kit-completion
[](https://github.com/postmodern/command_kit-completion/actions/workflows/ruby.yml)
[](https://codeclimate.com/github/postmodern/command_kit-completion)
[](https://badge.fury.io/rb/wordlist)* [Source](https://github.com/postmodern/command_kit-completion#readme)
* [Issues](https://github.com/postmodern/command_kit-completion/issues)
* [Documentation](https://rubydoc.info/gems/command_kit-complete)## Description
Adds a rake task that generates shell completion rules for a [command_kit] CLI.
The rake task loads the CLI class and uses the [completely] library to generate
the shell completion rules.## Features
* Supports automatically generating completion rules from a [command_kit] CLI
class's options and sub-commands.
* Supports loading additional completion rules from a YAML file.## Examples
```ruby
require 'command_kit/completion/task'
CommandKit::Completion::Task.new(
class_file: './examples/cli',
class_name: 'Foo::CLI',
output_file: 'completion.sh'
)
```## Synopsis
```shell
rake command_kit:completion
```## Requirements
* [Ruby] >= 3.0.0
* [command_kit] ~> 0.1
* [completely] ~> 0.6## License
Copyright (c) 2023-2024 Hal Brodigan
See {file:LICENSE.txt} for details.
[Ruby]: https://www.ruby-lang.org/
[command_kit]: https://github.com/postmodern/command_kit.rb#readme
[completely]: https://rubygems.org/gems/completely