add a flags struct other commands can impelemt

enable completion command
This commit is contained in:
Robin Olsen
2026-02-08 12:30:24 +01:00
parent 59b912325b
commit 0e5e22619b

View File

@@ -14,6 +14,15 @@ import (
// Must be called before executing any commands to ensure services are available.
var svc *service.Services
type Flags struct {
interactive bool
title string
description string
status string
issueType string
priority int
}
// rootCmd is the base command for the CLI application.
var rootCmd = &cobra.Command{
Short: "Project Management CLI",
@@ -56,7 +65,7 @@ func ExecuteArgsString(args []string) (string, error) {
// init function to set up the command hierarchy and options.
func init() {
rootCmd.CompletionOptions.DisableDefaultCmd = true
rootCmd.CompletionOptions.DisableDefaultCmd = false
rootCmd.AddGroup(&cobra.Group{ID: "help", Title: "Helping Commands"})
rootCmd.SetCompletionCommandGroupID("help")
rootCmd.SetHelpCommandGroupID("help")