feat: plugins
This commit is contained in:
@ -4,21 +4,16 @@ using Spectre.Console.Cli;
|
||||
|
||||
namespace Automancer.Command.Container;
|
||||
|
||||
public class Module : ICommandModuleWithRegistry
|
||||
public class Module : ICommandModule
|
||||
{
|
||||
public void Configure(IConfigurator config)
|
||||
{
|
||||
// No implementation needed here
|
||||
}
|
||||
|
||||
public string Name => "container";
|
||||
public string Description => "Container operations";
|
||||
public void Configure(IConfigurator config, CommandRegistry registry)
|
||||
{
|
||||
config.AddBranch("container", container =>
|
||||
config.AddBranch(Name, container =>
|
||||
{
|
||||
var description = "Container operations";
|
||||
|
||||
container.SetDescription(description);
|
||||
registry.Add("container", description);
|
||||
container.SetDescription(Description);
|
||||
registry.Add(Name, Description);
|
||||
|
||||
container.AddCommand<PsCommand>("ps").WithDescription("List containers");
|
||||
});
|
||||
|
Reference in New Issue
Block a user