Skip to content

Commit

Permalink
Add support for --argument: not necessarily having an argument
Browse files Browse the repository at this point in the history
  • Loading branch information
jbtule committed Jul 29, 2019
1 parent baa854b commit 6889755
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions ManyConsole.CommandLineUtils/Internal/Option.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ internal override CommandOption Register(CommandLineApplication app)
{

var template = MassagedTemplate();
var singleOrNo_Multiple = Template.Contains(":")
? CommandOptionType.SingleOrNoValue
: CommandOptionType.MultipleValue;

CmdOption =app.Option(template,Description,
CmdOption = app.Option(template,Description,
template.Contains("<")
? CommandOptionType.MultipleValue
? singleOrNo_Multiple
: CommandOptionType.NoValue);
return CmdOption;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Version>1.1.3-alpha</Version>
<Version>1.1.4-alpha</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 6889755

Please sign in to comment.