From fbcc929cb992835388fa3b04a369d5c9ecffa0af Mon Sep 17 00:00:00 2001 From: Robin Olsen Date: Fri, 6 Feb 2026 13:26:26 +0100 Subject: [PATCH] add fang --- pkg/cli/commands/root.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pkg/cli/commands/root.go b/pkg/cli/commands/root.go index e6a2efb..f58b224 100644 --- a/pkg/cli/commands/root.go +++ b/pkg/cli/commands/root.go @@ -1,7 +1,11 @@ package commands import ( + "context" + "os" + "github.com/LazyBachelor/LazyPM/internal/service" + "github.com/charmbracelet/fang" "github.com/spf13/cobra" ) @@ -15,7 +19,9 @@ var rootCmd = &cobra.Command{ func Execute(services *service.Services) error { SetServices(services) - return rootCmd.Execute() + return fang.Execute(context.Background(), rootCmd, + fang.WithColorSchemeFunc(fang.AnsiColorScheme), + fang.WithNotifySignal(os.Interrupt, os.Kill)) } func SetServices(services *service.Services) { @@ -25,7 +31,8 @@ func SetServices(services *service.Services) { func ExecuteWithArgs(args []string) error { rootCmd.SetArgs(args) - return rootCmd.Execute() + return fang.Execute(context.Background(), rootCmd, + fang.WithColorSchemeFunc(fang.AnsiColorScheme)) } func init() {