<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to bugs</title><link>https://sourceforge.net/p/cmdlineparser/bugs/</link><description>Recent changes to bugs</description><atom:link href="https://sourceforge.net/p/cmdlineparser/bugs/feed.rss" rel="self"/><language>en</language><lastBuildDate>Tue, 04 Dec 2007 07:20:22 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/cmdlineparser/bugs/feed.rss" rel="self" type="application/rss+xml"/><item><title>Incorrect parsing of integer and enum switches</title><link>https://sourceforge.net/p/cmdlineparser/bugs/5/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Parsing&lt;/p&gt;
&lt;p&gt;program.exe -n 1 -m 2&lt;/p&gt;
&lt;p&gt;where n and m are integer switches fails. To solve this replace the line&lt;/p&gt;
&lt;p&gt;this.valuePattern = @")((?&amp;lt;value&amp;gt;.+))";&lt;/p&gt;
&lt;p&gt;with&lt;/p&gt;
&lt;p&gt;this.valuePattern = @")((?&amp;lt;value&amp;gt;\S+))";&lt;/p&gt;
&lt;p&gt;in IntSwitch.initialise()&lt;/p&gt;
&lt;p&gt;The same goes for enum switches. The solution here is to replace&lt;/p&gt;
&lt;p&gt;this.valuePattern = @")((?:"")(?&amp;lt;value&amp;gt;.+)(?:"")|(?&amp;lt;value&amp;gt;\S+))";&lt;/p&gt;
&lt;p&gt;with&lt;/p&gt;
&lt;p&gt;this.valuePattern = @")((?:"")(?&amp;lt;value&amp;gt;[^""]+)(?:"")|(?&amp;lt;value&amp;gt;\S+))";&lt;/p&gt;
&lt;p&gt;in EnumSwitch.initialise()&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Tue, 04 Dec 2007 07:20:22 -0000</pubDate><guid>https://sourceforge.netbc991142592304bb0a1ac3e8df8890b9144efd82</guid></item><item><title>Incorrect parsing of multiple string switches</title><link>https://sourceforge.net/p/cmdlineparser/bugs/4/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;When trying to parse&lt;/p&gt;
&lt;p&gt;app.exe -a "aaa" -b "bbb"&lt;/p&gt;
&lt;p&gt;the value of switch a becomes&lt;/p&gt;
&lt;p&gt;aaa" -b "bbb&lt;/p&gt;
&lt;p&gt;This is caused by an incorrect regex in the function initialise in class StringSwitch. The line&lt;/p&gt;
&lt;p&gt;this.valuePattern = @")((?:"")(?&amp;lt;value&amp;gt;.+)(?:"")|(?&amp;lt;value&amp;gt;\S+))";&lt;/p&gt;
&lt;p&gt;should be replaced with&lt;/p&gt;
&lt;p&gt;this.valuePattern = @")((?:"")(?&amp;lt;value&amp;gt;[^""]+)(?:"")|(?&amp;lt;value&amp;gt;\S+))";&lt;/p&gt;
&lt;p&gt;EJ&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Sat, 01 Dec 2007 12:01:39 -0000</pubDate><guid>https://sourceforge.net797981e8802df55574a52eaef03dd96ca45429ae</guid></item><item><title>Suggestions for .NET 2.0 version</title><link>https://sourceforge.net/p/cmdlineparser/bugs/3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Some suggestions for the a .NET 2.0 version:&lt;/p&gt;
&lt;p&gt;public static T GetOptions&amp;lt;T&amp;gt;() where T : new()&lt;br /&gt;
{&lt;br /&gt;
return GetOptions&amp;lt;T&amp;gt;(System.Environment.CommandLine);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;public static T GetOptions&amp;lt;T&amp;gt;(string commandLine) where T : new()&lt;br /&gt;
{&lt;br /&gt;
return GetOptions&amp;lt;T&amp;gt;(commandLine, true);&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;public static T GetOptions&amp;lt;T&amp;gt;(string commandLine, bool includesProgramName) where T : new()&lt;br /&gt;
{&lt;br /&gt;
T result = new T();&lt;/p&gt;
&lt;p&gt;CommandLineParser parser = new CommandLineParser(result);&lt;br /&gt;
parser.Parse(commandLine, includesProgramName);&lt;/p&gt;
&lt;p&gt;return result;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;public static string GetCommandLine()&lt;br /&gt;
{&lt;br /&gt;
return System.Environment.CommandLine;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;public static string GetUsage&amp;lt;T&amp;gt;() where T : new()&lt;br /&gt;
{&lt;br /&gt;
T result = new T();&lt;/p&gt;
&lt;p&gt;CommandLineParser parser = new CommandLineParser(result);&lt;br /&gt;
parser.Parse(System.Environment.CommandLine, true);&lt;/p&gt;
&lt;p&gt;return parser.Usage;&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;public static string GetExplicitOptions&amp;lt;T&amp;gt;() where T : new()&lt;br /&gt;
{&lt;br /&gt;
T result = new T();&lt;/p&gt;
&lt;p&gt;CommandLineParser parser = new CommandLineParser(result);&lt;br /&gt;
parser.Parse(System.Environment.CommandLine, true);&lt;/p&gt;
&lt;p&gt;return parser.ExplicitOptions;&lt;br /&gt;
}&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 08 Oct 2007 12:36:34 -0000</pubDate><guid>https://sourceforge.net962f2192d43933745c155ef6e7115d37b6874ca5</guid></item><item><title>Incorrect constructor Parse</title><link>https://sourceforge.net/p/cmdlineparser/bugs/2/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The constructor public void Parse(string[] args) does not take into account arguments containing spaces. A more correct solution is:&lt;/p&gt;
&lt;p&gt;public void Parse(string[] args)&lt;br /&gt;
{&lt;br /&gt;
string commandLine = "";&lt;br /&gt;
foreach (string arg in args)&lt;br /&gt;
{&lt;br /&gt;
if (commandLine.Length &amp;gt; 0)&lt;br /&gt;
{&lt;br /&gt;
commandLine += " ";&lt;br /&gt;
}&lt;br /&gt;
if (!String.IsNullOrEmpty(arg) &amp;amp;&amp;amp; arg.Contains(" "))&lt;br /&gt;
{&lt;br /&gt;
commandLine += "\"" + arg + "\"";&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
commandLine += arg;&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;Probably this leads to problems&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 08 Oct 2007 12:35:49 -0000</pubDate><guid>https://sourceforge.netf000f936d60f85216b8a9458d7d2fcc5d02045f9</guid></item><item><title>Incorrect parsing of commandline</title><link>https://sourceforge.net/p/cmdlineparser/bugs/1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Commandlines like&lt;/p&gt;
&lt;p&gt;"C:\path with space\program.exe" -k "text with space"&lt;/p&gt;
&lt;p&gt;are parsed incorrectly.&lt;/p&gt;
&lt;p&gt;The crulpit is in CommandLineParser.trimOffApplicationName. Changing the regex from&lt;/p&gt;
&lt;p&gt;@"^(?&amp;lt;commandLine&amp;gt;("".+""|(\S)+))(?&amp;lt;remainder&amp;gt;.+)"&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;@"^(?&amp;lt;commandLine&amp;gt;(""(^"")+""|(\S)+))(?&amp;lt;remainder&amp;gt;.+)"&lt;/p&gt;
&lt;p&gt;solves this problem.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Anonymous</dc:creator><pubDate>Mon, 08 Oct 2007 12:30:29 -0000</pubDate><guid>https://sourceforge.nete4c6d5f33c7512eb9a8f54f403448d22f9601557</guid></item></channel></rss>