mirror of
https://github.com/yaakov-h/Shamir.git
synced 2025-01-18 08:46:33 +00:00
sort commands alphabetically
This commit is contained in:
parent
58fc4892eb
commit
e3db8d39f1
1 changed files with 3 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
using System.Collections.Immutable;
|
using System.Collections.Immutable;
|
||||||
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using CommandLine;
|
using CommandLine;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
@ -32,8 +33,8 @@ namespace Shamir.Console
|
||||||
var tree = new DefaultCommandTree(
|
var tree = new DefaultCommandTree(
|
||||||
"shamir",
|
"shamir",
|
||||||
"command-line multitool",
|
"command-line multitool",
|
||||||
scope.ServiceProvider.GetServices<ICommandTree>().ToImmutableArray(),
|
scope.ServiceProvider.GetServices<ICommandTree>().OrderBy(x => x.Name).ToImmutableArray(),
|
||||||
scope.ServiceProvider.GetServices<ICommand>().ToImmutableArray()
|
scope.ServiceProvider.GetServices<ICommand>().OrderBy(x => x.Name).ToImmutableArray()
|
||||||
);
|
);
|
||||||
|
|
||||||
var command = tree.FindCommand(args);
|
var command = tree.FindCommand(args);
|
||||||
|
|
Loading…
Reference in a new issue