Creating CLI tools is easier than you think
During my work on my Deprivatizer script I wanted to learn a little bit about making CLI tools in C#. I had to write some really weird things in Google, because I learned about many libraries one can download as NuGet packages and then configure them and then fail to implement them at first.
So I tried something different.
I built a simple console application
using System;
namespace Deprivatizer.Cmd
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Yes, I did not change a thing. I put a break point at the start. Went to the projects properties, and added this line
smth.xml -super "this is a test"
in Application arguments.
When I run the application I noticed, that I got 3 arguments. It is actually parsed as command line parameters. Not simply split by spaces, but taken quotes when interpreting strings.
Srsly, implementing your own CLI will be easier than you think.