commandlineparser / commandlineparser/commandline

All options optional in one of sets

オープン
#933 コメント 3 件 リアクション 0 件 担当者 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 を短くまとめたダイジェスト。