dotnet / dotnet/command-line-api

System.CommandLine arguments without options

Open
#2,247 14 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Hello everyone,

I am new to .Net coming from a Unix background and I am developing a dotnet command line application that needs a couple of options, followed by a list of one or more input files, i.e:

` mycmd —dpi 72 —grayscale input_file1.jpg input_file2.png`

I have poured over the documentation and searched all over the web and have only been able to find examples of arguments that are part of an option, as in the —dpi 72 above. If someone could provide a simple example of how to define a standalone argument with an arity of OneOrMore or provide a link to some relevant documentation I would greatly appreciate it.

Best Regards,

Daryl

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.