Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['5.0.x']
dotnet-version: ['6.0.x']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['5.0.x']
dotnet-version: ['6.0.x']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ['5.0.x']
dotnet-version: ['6.0.x']

steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

An easily configured command line arguments parser that makes short work of turning those pesky `string[] args` into a strongly-typed configuration object.

![.net](https://img.shields.io/badge/Frameworks-.netstandard21+net50-purple)
![.net](https://img.shields.io/badge/Frameworks-.netstandard2.0+.netstandard2.1+net5.0+net6.0-purple)
![GitHub](https://img.shields.io/github/license/verticalsoftware/vertical-commandline)
![Package info](https://img.shields.io/nuget/v/vertical-commandline.svg)

Expand Down
4 changes: 2 additions & 2 deletions src/Vertical.CommandLine.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netstandard2.1;net5.0;net6.0</TargetFrameworks>
<LangVersion>8.0</LangVersion>
<RootNamespace />
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
Expand All @@ -9,7 +9,7 @@
<PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
<Description>Simple command line argument mapping</Description>
<Authors>Vertical Software contributors</Authors>
<VersionPrefix>2.1.0</VersionPrefix>
<VersionPrefix>2.1.1</VersionPrefix>
<PackageId>vertical-commandline</PackageId>
<PackageTags>commandline;utilities</PackageTags>
<PackageProjectUrl>https://github.com/verticalsoftware/vertical-commandline</PackageProjectUrl>
Expand Down
2 changes: 1 addition & 1 deletion src/Vertical/CommandLine/Parsing/TokenMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public sealed class TokenMatcher : ITokenMatcher
private static readonly string CompactShortOptionPattern = $"^-(?<{TemplateIdGroup}>[0-9a-zA-Z]+)$";
private static readonly string LongOptionPattern = $"^--(?<{TemplateIdGroup}>[\\w-]+)$";
private static readonly string WordPattern = $"^(?![\\W])(?<{TemplateIdGroup}>[0-9a-zA-Z-]+)$";
private static readonly string CompositeOptionPattern = $"^--?(?<{TemplateIdGroup}>[0-9a-zA-Z]+)[=:](?<{OperandGroup}>.+)?$";
private static readonly string CompositeOptionPattern = $"^--?(?<{TemplateIdGroup}>[\\w-]+)[=:](?<{OperandGroup}>.+)?$";
private const string OptionsEndPattern = "^--$";
private const string AnyPattern = ".+";

Expand Down
4 changes: 3 additions & 1 deletion test/Parsing/TokenMatcherTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public void PositiveMatchReturnsTokens(TokenMatcher matcher, string input, Token
Scenario(TokenMatcher.CompositeOption, "-a:", new[]{ new Token(TokenType.CompositeOption, "a")}),
Scenario(TokenMatcher.CompositeOption, "-a=", new[]{ new Token(TokenType.CompositeOption, "a")}),
Scenario(TokenMatcher.CompositeOption, "--long=", new[]{ new Token(TokenType.CompositeOption, "long")}),
Scenario(TokenMatcher.CompositeOption, "--long:", new[]{ new Token(TokenType.CompositeOption, "long")})
Scenario(TokenMatcher.CompositeOption, "--long:", new[]{ new Token(TokenType.CompositeOption, "long")}),
Scenario(TokenMatcher.CompositeOption, "--long-with-dashes:", new[]{ new Token(TokenType.CompositeOption, "long-with-dashes")}),
Scenario(TokenMatcher.CompositeOption, "--long-with-dashes=", new[]{ new Token(TokenType.CompositeOption, "long-with-dashes")})
);

[Theory, MemberData(nameof(NegativeTheories))]
Expand Down
2 changes: 1 addition & 1 deletion test/Vertical.CommandLine.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\assets\Vertical.CommandLine.snk</AssemblyOriginatorKeyFile>
Expand Down