[Mono-dev] RFC: Mono.Options.CommandSet

Jonathan Pryor jonpryor at vt.edu
Wed Mar 1 20:27:14 UTC 2017


An occasionally requested feature for Mono.Options is support for “sub-commands”, to more easily create a *suite* of commands in the style of git and svn. Creating such suites could be done before, e.g. in mdoc [0], but it wasn’t straightforward.

Introducing Mono.Options.CommandSet:

	https://github.com/mono/mono/pull/4432

CommandSet allows intermixing text, global options, and commands in a similar manner to OptionSet, and produces `--help` and `help` command output accordingly.

Example app and command output:

	https://github.com/jonpryor/mono/blob/jonp-mono.options.commandset/mcs/class/Mono.Options/Documentation/en/examples/commands.cs
	https://github.com/jonpryor/mono/blob/jonp-mono.options.commandset/mcs/class/Mono.Options/Documentation/en/examples/commands.txt

Comments and feedback appreciated.

Thanks,
 - Jon

[0]: https://github.com/mono/api-doc-tools/blob/master/mdoc/Mono.Documentation/mdoc.cs#L40-L52



More information about the Mono-devel-list mailing list