commandlineparser / commandlineparser/commandline

All options optional in one of sets

未关闭
#933 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C#
星标
4.8k
派生
478
PR 合并指标
30 天内没有已合并 PR

描述

**Describe the bug**
I have two parameter sets. One has only one option, bool list, works fine:

`mytool new --list # works fine`

The other set works fine, while it has at least one required option

`mytool new --template "default"`

But I want all the options in my second set to be optional. I'd like to run

`mytool new`

and expect the second set is picked up, with "template" option set to "default". I cannot achieve it.

**To Reproduce**
https://dotnetfiddle.net/VE1xFs

**Expected behavior**
When one of the sets has all options optional, with defaults, it is automatically picked when no command-line arguments are provided.

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。