mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-16 08:52:50 +08:00
Fix Unescaped Bracket
Was throwing error because of unescaped end bracket at the end of options.
This commit is contained in:
parent
f2566f2ca4
commit
ab73d16583
@ -1,25 +1,25 @@
|
|||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
|
|
||||||
namespace GridExample
|
namespace GridExample
|
||||||
{
|
{
|
||||||
public sealed class Program
|
public sealed class Program
|
||||||
{
|
{
|
||||||
static void Main(string[] args)
|
static void Main(string[] args)
|
||||||
{
|
{
|
||||||
AnsiConsole.WriteLine();
|
AnsiConsole.WriteLine();
|
||||||
AnsiConsole.MarkupLine("Usage: [grey]dotnet [blue]run[/] [[options] [[[[--] <additional arguments>...]][/]");
|
AnsiConsole.MarkupLine("Usage: [grey]dotnet [blue]run[/] [[options]] [[[[--]] <additional arguments>...]]]][/]");
|
||||||
AnsiConsole.WriteLine();
|
AnsiConsole.WriteLine();
|
||||||
|
|
||||||
var grid = new Grid();
|
var grid = new Grid();
|
||||||
grid.AddColumn(new GridColumn { NoWrap = true });
|
grid.AddColumn(new GridColumn { NoWrap = true });
|
||||||
grid.AddColumn(new GridColumn { NoWrap = true, Width = 2 });
|
grid.AddColumn(new GridColumn { NoWrap = true, Width = 2 });
|
||||||
grid.AddColumn();
|
grid.AddColumn();
|
||||||
grid.AddRow("Options:", "", "");
|
grid.AddRow("Options:", "", "");
|
||||||
grid.AddRow(" [blue]-h[/], [blue]--help[/]", "", "Show command line help.");
|
grid.AddRow(" [blue]-h[/], [blue]--help[/]", "", "Show command line help.");
|
||||||
grid.AddRow(" [blue]-c[/], [blue]--configuration[/] <CONFIGURATION>", "", "The configuration to run for.");
|
grid.AddRow(" [blue]-c[/], [blue]--configuration[/] <CONFIGURATION>", "", "The configuration to run for.");
|
||||||
grid.AddRow(" [blue]-v[/], [blue]--verbosity[/] <LEVEL>", "", "Set the [grey]MSBuild[/] verbosity level.");
|
grid.AddRow(" [blue]-v[/], [blue]--verbosity[/] <LEVEL>", "", "Set the [grey]MSBuild[/] verbosity level.");
|
||||||
|
|
||||||
AnsiConsole.Render(grid);
|
AnsiConsole.Render(grid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user