Order instances by host

This commit is contained in:
Gervasio Marchand 2022-12-05 11:10:05 -03:00
parent 509fbc964f
commit 2db1ac7e43
No known key found for this signature in database
GPG Key ID: B7736CB188DD0A38

View File

@ -17,7 +17,7 @@ public class ListInstancesCommand : ConfigEnabledAsyncCommand<EmptyCommandSettin
table.AddColumn("Instance");
table.AddColumn("Key");
foreach (var group in hostToKeys)
foreach (var group in hostToKeys.OrderBy(g => g.Key))
{
var host = group.Key;
foreach (var key in group)
@ -25,7 +25,7 @@ public class ListInstancesCommand : ConfigEnabledAsyncCommand<EmptyCommandSettin
table.AddRow($"[green]{host}[/]", $"[red]{key}[/]");
}
}
AnsiConsole.Write(table);
return 0;
}