Questions tagged [system.commandline.dragonfruit]

For help on the DragonFruit command line parsing system in newer versions of .NET System.CommandLine, as presented here: https://www.hanselman.com/blog/dragonfruit-and-systemcommandline-is-a-new-way-to-think-about-net-console-apps

2 questions
1
vote
0 answers

How can I use System.Commandline.DragonFruit to parse options if the options are not preceded with double dash

I have an existing console app that takes option args that don't have the -- in front of them. For example: ./myapp businessDate=20230128 type=charley location=nashville Currently I parse the args[] array tokens and split them around the "=" to get…
1
vote
3 answers

How can I define an enum as CLI option with System.CommandLine.DragonFruit?

I'd like to define an enum as CLI option in C# System.CommandLine.DragonFruit. Is there "builtin" support for this use case? In detail I need an equivalent to Python's click implementation of this: @click.option('-m', '--mode', required=True,…
thinwybk
  • 4,193
  • 2
  • 40
  • 76