From 7ac3e496d636e72486ba1be26f25da9745877472 Mon Sep 17 00:00:00 2001 From: Alex Ottr Date: Tue, 17 Jun 2025 02:02:13 +0200 Subject: [PATCH] enable shell completion --- cmd/nox/main.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/cmd/nox/main.go b/cmd/nox/main.go index efc9fa4..36bdce4 100644 --- a/cmd/nox/main.go +++ b/cmd/nox/main.go @@ -25,8 +25,9 @@ func main() { var outputPath string cmd := &cli.Command{ - Name: "nox", - Usage: "Manage and decrypt app secrets", + Name: "nox", + Usage: "Manage and decrypt app secrets", + EnableShellCompletion: true, Flags: []cli.Flag{ &cli.StringFlag{ Name: "config", @@ -138,11 +139,15 @@ func main() { Aliases: []string{"v"}, Usage: "Validate configuration and secret integrity", Action: func(ctx context.Context, cmd *cli.Command) error { - cfg, err := config.Load(configPath) + rtx, err := config.BuildRuntimeContext(config.RuntimeOptions{ + ConfigPath: configPath, + StatePath: statePath, + IdentityPath: identityPath, + }) if err != nil { - log.Fatalf("failed to load config: %v", err) + log.Fatalf("failed to build runtime context: %v", err) } - return processor.Validate(cfg) + return processor.ValidateConfig(rtx.Config) }, }, }, -- 2.51.2