command-line-api icon indicating copy to clipboard operation
command-line-api copied to clipboard

System.CommandLine arguments without options

Open daryl-williams opened this issue 11 months ago • 14 comments

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

daryl-williams avatar Jul 25 '23 15:07 daryl-williams