A simple and light-weight parser for command line arguments, which makes it possible to access parameters from the command line via well-defined .NET data structures.
MIT License
3
stars
4
forks
source link
Add the name of the program as the command name for the top-level ParsingResults #5
test value01 value02 --flag --argument01 value03 --argument02 value04
then test should be set as the command name in the top-level ParsingResults as it is the equivalent to a command. When the program contains a file extension and/or a path, then the path should be stripped from the command name, e.g.
Right now the program file name and path are just discarded during the parsing, which is not good, considering that, when help pages are implemented, the program file name is important, as it is needed to display the usage of the program.
When having command line parameters as follows:
then
test
should be set as the command name in the top-levelParsingResults
as it is the equivalent to a command. When the program contains a file extension and/or a path, then the path should be stripped from the command name, e.g.should result in
test.exe
being the command name.Right now the program file name and path are just discarded during the parsing, which is not good, considering that, when help pages are implemented, the program file name is important, as it is needed to display the usage of the program.