Open
Description
Consider following scenario:
public class ScaffoldCommand
{
[Value(0)]
public string ConnectionString { get; set; }
[Value(1)]
public string Provider { get; set; }
}
ConnectionString could be a long string that contains spaces and we usually surround them with double quotes so the CLI could recognize it, take entity framework core for example:
dotnet ef dbcontext scaffold "Data Source = xxxxxx;Database = xxxxxx; User ID=xxxxxx; Password=xxxxxx" Microsoft.EntityFrameworkCore.SqlServer
Currently public static string FormatCommandLine<T>(this Parser parser, T options, Action<UnParserSettings> configuration);
does not seem to have this kind of capability, I can only generate arguments without double quotes.
I wonder if we could add something like UseDoubleQuoteOnArguments
to UnParserSettings
so we could configure it to generate arguments surrounded by double quotes.
Any thoughts?
Activity
nemec commentedon Nov 9, 2016
IMO that should be a default feature . Can you think of a reason why anyone would want to turn it off, assuming quotes are only added if there is whitespace in the value?
lukefan6 commentedon Nov 10, 2016
Actually adding quotes only when there is whitespace would be better. I was not thinking straight lol.