Implement Git series
As a CLI program, ugit
must have to accept multi-commands according to the various input. For example
> ugit init
> ugit add a.txt
C# doesn’t support command parameters parse very well. CommandLine does the job very well.
Now, we add commit
command which accepts a required message
parameter. what’s more, you can customize the parameter such short verb and long verb forms.
How to use these option?
By default, this package supports up to 16 options. But in ugit, it probably exceeds that. What we need to do is just adding ParserResult<object>
and Parser
extension method.
So the ugit
basic workflow is obvious.