DitoDisco.CommandLineArgs 1.0.0

dotnet add package DitoDisco.CommandLineArgs --version 1.0.0                
NuGet\Install-Package DitoDisco.CommandLineArgs -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DitoDisco.CommandLineArgs" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DitoDisco.CommandLineArgs --version 1.0.0                
#r "nuget: DitoDisco.CommandLineArgs, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DitoDisco.CommandLineArgs as a Cake Addin
#addin nuget:?package=DitoDisco.CommandLineArgs&version=1.0.0

// Install DitoDisco.CommandLineArgs as a Cake Tool
#tool nuget:?package=DitoDisco.CommandLineArgs&version=1.0.0                

DitoDisco.CommandLineArgs

Parses arguments passed to the executable and lets you retrieve their values easily.

Implements the syntax described at https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html.

Usage

  • Define your options:
    • Specify what name(s) they're called
    • Specify whether they can have a value or behave like flags
  • Create a CommandLineOptions using an array of accepted options and an array of arguments to parse.
  • In the created object, find:
    • Which of your options are defined
    • Whether they've been given values
    • Positional (non-option) arguments

See also the example project.

Contributing

If you've found a bug and there's no open issue about it, open one yourself. It helps if you also write a failing unit test for it.

If you'd like to just help fix existing bugs instead, help investiage open issues or create a pull request with your fix.
Pull requests should be limited to fixes, and should conform to the project's code style.

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 242 11/19/2023