Age | Commit message (Collapse) | Author | |
---|---|---|---|
2011-03-07 | [Mono.Options] Add option header support. | Jonathan Pryor | |
Option headers can be provided via OptionSet.Add(string), and allows forgoing the use of a separate mechanism to provide contextual output. For example, one used to do this: bool show_help = false; new OptionSet { // ... { "help|h|?", v => show_help = v != null }, }.Parse (args); if (show_help) { Console.WriteLine ("usage: sample-app ARGS"); p.WriteOptionDescriptions (Console.Out); // ... } Using the new header support, the "contextual" output can be merged with the option specification: bool show_help = false; new OptionSet { "usage: sample-app ARGS", { "help|h|?", v => show_help = v != null }, }.Parse (args); if (show_help) p.WriteOptionDescriptions (Console.Out); Furthermore, headers can be provided "inline", thus serving as a mechanism to categorize options: // mcs options var p = new OptionSet { "Mono C# compiler, Copyright 2001 - 2011 Novell, Inc.", "mcs [options] source-files", // ... "Resources:", { "linkresource|linkres:", v => /* ... */ }, // ... "", "Options can be of the form -option or /option", }; | |||
2010-12-01 | Add response file suport to Mono.Options. | Jonathan Pryor | |
Response file support is an "opt-in" feature, performed by adding a ResponseFileSource to the OptionSet initialization logic: var p = new OptionSet () { // normal options here... new ResponseFileSource (), }; Response files make use of the new "ArgumentSource" support, which acts as a low-level argument pre-processor, allowing processing of arguments _before_ Option processing is performed. | |||
2008-11-03 | Add mono-lineeditor | Miguel de Icaza | |
svn path=/trunk/mono/; revision=117715 | |||
2008-10-14 | * data/mono-options.pcs.in: We're not installing Mono.Options.dll into | Jonathan Pryor | |
the GAC anymore, we're just concerned `pkg-config --variable=Source` support. svn path=/trunk/mono/; revision=115791 | |||
2008-10-14 | * data/mono-options.pc.in: Add a Sources variable so that | Jonathan Pryor | |
`pkg-config --variable Sources mono-options` can be used to grab the sources to Mono.Options (useful for embedding). svn path=/trunk/mono/; revision=115734 | |||
2008-10-14 | * configure.in: Generate data/mono-options.pc. | Jonathan Pryor | |
* data/Makefile.am: Support mono-options.pc.in and mono-options.pc. * data/mono-options.pc.in: Added. svn path=/trunk/mono/; revision=115729 |