diff --git a/src/CommandLine/Core/Tokenizer.cs b/src/CommandLine/Core/Tokenizer.cs index 0e70d03e..4ac6e57c 100644 --- a/src/CommandLine/Core/Tokenizer.cs +++ b/src/CommandLine/Core/Tokenizer.cs @@ -19,7 +19,7 @@ public static StatePair> Tokenize( Action onError = e => errors.Add(e); var tokens = from arg in arguments - from token in !arg.StartsWith("-", StringComparison.Ordinal) + from token in !arg.StartsWith("-", StringComparison.Ordinal) && !arg.StartsWith("/", StringComparison.Ordinal) ? new Token[] { Token.Value(arg) } : arg.StartsWith("--", StringComparison.Ordinal) ? TokenizeLongName(arg, onError) @@ -55,7 +55,7 @@ private static IEnumerable TokenizeShortName( throw new ArgumentNullException("value"); } - if (value.Length > 1 || value[0] == '-' || value[1] != '-') + if (value.Length > 1 || value[0] == '-' || value[0] == '/' || value[1] != '-') { var text = value.Substring(1);