Skip to content

Releases: natemcmaster/CommandLineUtils

v2.2.0-rc

v2.2.0-beta

08 Mar 05:09
8f1d78e
Compare
Choose a tag to compare
v2.2.0-beta Pre-release
Pre-release

This release contains a huge refactoring to the way the attribute-binding was implemented. As a part of this, I've made it possible for you to extend and control better the way that a .NET type is bound to CommandLineApplication.

New features:

  • Add CommandOptionType.SingleOrNoValue. Options of this type can be a switch, or have a value but only in the form --param:value or --param=value.
  • Support mapping Tuple<bool,T> and ValueTuple<bool,T> to CommandOptionType.SingleOrNoValue
  • Added CommandLineApplication<TModel>. This allows associating an application with a specific .NET type
  • Convention API. Adds support for writing your own conventions to convert command line arguments into a .NET type
  • [@sebastienros] - Support for case-insensitive options
  • Add support for constructor injection and dependency injection by providing a custom service provider

Build: https://ci.appveyor.com/project/natemcmaster/commandlineutils/build/2.2.0-beta
Release: https://www.nuget.org/packages/McMaster.Extensions.CommandLineUtils/2.2.0-beta

v2.2.0-alpha

v2.1.1

28 Dec 07:10
Compare
Choose a tag to compare

[Fixed]

  • Fix #32 - Don't validate options when --help or --version is specified
  • Fix #30 - Help option prints incorrect ShortName

https://www.nuget.org/packages/McMaster.Extensions.CommandLineUtils/2.1.1

v2.1.0

28 Dec 07:07
Compare
Choose a tag to compare

Same as the 2.1.0-rc release, but with documentation, more samples, and release notes.

Attribute parsing and validation: 2.1.0-rc

07 Dec 03:42
Compare
Choose a tag to compare

Includes all the features of 2.1.0-alpha, but have been refined to handled better a wider range of configurations.

Plus, this includes parameter validation.

Attribute parsing: 2.1.0-alpha

11 Nov 05:12
Compare
Choose a tag to compare
Pre-release

https://www.nuget.org/packages/McMaster.Extensions.CommandLineUtils/2.1.0-alpha

2.1.0:
New features:

  • Attributes. Simplify command line argument definitions by adding attributes to a class that represents options and arguments.
    • Options defined as [Option] or [Argument], [Subcommand].
    • Command parsing options can be defined with [Command] and [Subcmomand].
    • Special options include [HelpOption] and [VersionOption].
  • Async from end to end. Using C# 7.1 and attribute binding, your console app can be async from top to bottom.

New API

  • Added OptionAttribute, ArgumentAttribute, CommandAttribute, SubcommandAttribute, HelpOptionAttribute, and VersionOptionAttribute.
  • CommandLineApplication.Execute<TApp>() - executes an app where TApp uses attributes to define its options
  • CommandLineApplication.ExecuteAsync<TApp>() - sample thing, but async.
  • CommandLineApplication.StopParsingHelpOption and StopParsingVerboseOption. When the help and verbose options are matched
    against a command-line flag, the parsing will stop by default. You can turn this off by setting these options if you
    want OnExecute to be invoked no matter what.
  • CommandLineApplication.HandleResponseFiles - the parser can treat arguments that begin with '@' as response files.
    Response files contain arguments that will be treated as if they were passed on command line.

Minor bug fixes:

  • Add return types to .VerboseOption() and ensure .HasValue() is true when HelpOption or VerboseOption are matched
  • Fix a NullReferenceException in some edge cases when parsing args

2.0.1

13 Oct 09:19
Compare
Choose a tag to compare

2.0.0

16 Sep 21:24
Compare
Choose a tag to compare

Changes from the RC

  • Add .NET Framework 4.5 support, in addition to .NET Standard 2.0
  • Fixed up a few docs

https://www.nuget.org/packages/McMaster.Extensions.CommandLineUtils/2.0.0

2.0.0 Release Candidate

10 Sep 01:26
Compare
Choose a tag to compare
Pre-release

Changes

  • Added a bunch of documentation
  • Updated the licensing in the source code

Unless there are any big changes, the RTM of 2.0.0 will be basically the same.

https://www.nuget.org/packages/McMaster.Extensions.CommandLineUtils/2.0.0-rc