commandlineparser / commandlineparser/commandline

All options optional in one of sets

Open
#933 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.8k
Forks
478
PR merge metrics
No merged PRs in 30d

Description

**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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.