Open
Description
Describe the bug
Read string option with backslash \ and " results in reading " in the string.
To Reproduce
public class Options
{
[Option('P', "path", Required = true, HelpText = "Set working directory path.")]
public string Path { get; set; }
}
static void Main(string[] args)
{
string path = "";
var result = Parser.Default.ParseArguments<Options>(args)
.WithParsed(o =>
{
path = o.Path;
});
if (result.Tag == ParserResultType.Parsed)
{
Console.WriteLine($"Path: {path}");
}
}
- Passing in argument
-P "C:\path\to\read\"
- Console output is
Path: C:\path\to\read"
Expected behavior
Read backslash as it is. In the above example, output should be Path: C:\path\to\read\
Additional context
Am i missing some options?
Ref issues/226 reports the same problem, still not fixed?
Metadata
Metadata
Assignees
Labels
No labels