feat: make cursor visible on exit
This commit is contained in:
@@ -1,15 +1,16 @@
|
|||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
namespace AnchorCli.Commands;
|
namespace AnchorCli.Commands;
|
||||||
|
|
||||||
public class ExitCommand : ICommand
|
public class ExitCommand : ICommand
|
||||||
{
|
{
|
||||||
public string Name => "exit";
|
public string Name => "exit";
|
||||||
public string Description => "Exit the application";
|
public string Description => "Exit the application";
|
||||||
|
|
||||||
public Task ExecuteAsync(string[] args, CancellationToken ct)
|
public Task ExecuteAsync(string[] args, CancellationToken ct)
|
||||||
{
|
{
|
||||||
AnsiConsole.MarkupLine("[green]Goodbye![/]");
|
AnsiConsole.MarkupLine("[green]Goodbye![/]");
|
||||||
Environment.Exit(0);
|
Console.CursorVisible = true;
|
||||||
return Task.CompletedTask;
|
Environment.Exit(0);
|
||||||
}
|
return Task.CompletedTask;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user