More powerful options
- Dominant language
- Ruby
- Stars
- 358
- Forks
- 40
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 1
Description
## Flags
[options](https://dry-rb.org/gems/dry-cli/1.0/options/) are always considered having a value `--mode=http2` or `--mode http2`.
- [ ] Having flags (options without value)
E.g. just having `--color`, having the flag equals `options.fetch(:color)` returning true, not having the flag equals `options.fetch(:color)` returning false. It's better than having `--color true` and `--color false` with `values: %w[true false]` and casting the string to a boolean.
## Aliases
It would be nice to have has many aliases as we want for an option.
- [ ] Having aliases
E.g. `-c, --color` or `--color, --colour`.
It's often handy to have long flags that are mnemotechnic and short flags for those familiar with the tool that want to type faster.
## Mutually exclusive
Sometimes it is required to have mutually exclusive options, see #128.
- [ ] Having mutually exclusive options #128
## Casting type
As passed from the CLI, all values are strings, so it would be handy to have cast types for options.
- [x] Having cast types - ✔️ https://github.com/dry-rb/dry-cli/pull/157
E.g. `--age 21` or `--advanced true`. It's allows to cast type in the definition of the option, avoiding forgetting to cast it when the value is retrieved or to cast it several times if the option is used at multiple places.
Contributor guide
Assessment
This issue has not been assessed yet.