Giter Site home page Giter Site logo

masesgroup / cliparser Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 2.0 12.97 MB

A library to manage command-line arguments in a simple way.

Home Page: https://cliparser.masesgroup.com/

License: MIT License

C# 100.00%
cli command-line command-line-tool dotnet dotnet-core dotnet-framework dotnet6 dotnetcore net6 netstandard netstandard20 parser

cliparser's People

Contributors

github-actions[bot] avatar mariomastrodicasa avatar masesdevelopers avatar

Watchers

 avatar

cliparser's Issues

Add a new setting property to check for unwanted switches

Is your feature request related to a problem? Please describe.
Add a setting to enable or disable the check for unwanted switches.

Describe the solution you'd like
A new setting which check if there are swithes not listed in the expected list.

Describe alternatives you've considered
N/A

Additional context
N/A

Expose some useful constants related to command-line switches

Is your feature request related to a problem? Please describe.
In the usage of the library sometimes can be useful to have the values related to command-ine switch prefix or key-value seaprator in use.

Describe the solution you'd like
Put in the settings some readonly property which exposes the internal constants in use from the Parser instance.

Describe alternatives you've considered
Create some fixed constants values associated to the Parser class.

Additional context
N/A

Update to .NET 6

Is your feature request related to a problem? Please describe.
The project shall be targeted to .NET 6 too

Describe the solution you'd like
Add the .NET 6 target to the project, meanwhile update NuGet package to contain README

Describe alternatives you've considered
N/A

Additional context
N/A

Parameter starting with same string make confusion in the engine

When multiple parameters starts with the same string creates confusion and the first one in the list is used.

To Reproduce
Steps to reproduce the behavior:

  1. Create a list of parameters adding two which starts with the same string: MyParam (type string) and MyParamDuplicate (any other type)
  2. Put MyParamDuplicate in the command line
  3. Check value of MyParam and MyParamDuplicate
  4. MyParam will have the value set on MyParamDuplicate

Expected behavior
Both parameters shall be analyzed without confusing them

Screenshots
N/A

Desktop (please complete the following information):

  • Version: 2.1.1

Additional context
The problem raises even if MyParamDuplicate is not added in the argument list

License is not reported in the package

Describe the bug
The license is not shown in the package

To Reproduce
Steps to reproduce the behavior:

  1. Go to nuget.org
  2. Click on on the package
  3. On the right column the license is not available

Expected behavior
Report the license in the package

Screenshots

image

Desktop (please complete the following information):

  • OS: All
  • Version: All

Additional context
N/A

Exception raised from Parser.HelpInfo

Describe the bug
If the method Parser.HelpInfo is called outside a real console application (e.g. the output is redirected) an exception is raised because there isn't a real underlying device.

Expected behavior
Trap the exception or identify the unavailable device.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: all
  • Version: all

Additional context
N/A

Add a new param to cross check command-line switches

Is your feature request related to a problem? Please describe.
In some conditions a command-line switch can depend on other switches. Add a mechanism to check related switches.

Describe the solution you'd like
A function invoked at the end of parsing to check if the expected information are available.

Describe alternatives you've considered
N/A

Additional context
N/A

Convert static class in an instance

Is your feature request related to a problem? Please describe.
The Parser class shall be converted into an instance class to solve the param mixing when multiple processes use the library.

Describe the solution you'd like
Convert the static class Parser into a standard class

Describe alternatives you've considered
N/A

Additional context
API breaking change

Settings shall be available per instance

Is your feature request related to a problem? Please describe.
The basic settings shall be moved into a new class to avoid mixing between multiple instances.

Describe the solution you'd like
Create a new class which manages settings of the parser, the default settings shall be the one available in the actual static fields.

Describe alternatives you've considered
N/A

Additional context
N/A

Expose unparsed command line arguments

Is your feature request related to a problem? Please describe.
After parsing the remaining command-line arguments are not available. Some application can need them for further elaborations.

Describe the solution you'd like
Expose a new property with Unparsed arguments.

Describe alternatives you've considered
N/A

Additional context
N/A

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.