Skip to content

Commit

Permalink
git: diagnose
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Aug 17, 2024
1 parent bb651d4 commit 05678dd
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions completers/git_completer/cmd/diagnose.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)

var diagnoseCmd = &cobra.Command{
Use: "diagnose",
Short: "Generate a zip archive of diagnostic information",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groups[group_interrogator].ID,
}

func init() {
carapace.Gen(diagnoseCmd).Standalone()

diagnoseCmd.Flags().String("mode", "", "specify the type of diagnostics that should be collected")
diagnoseCmd.Flags().StringP("output-directory", "o", "", "place the resulting diagnostics archive in <path>")
diagnoseCmd.Flags().StringP("suffix", "s", "", "specify an alternate suffix for the diagnostics archive name")
rootCmd.AddCommand(diagnoseCmd)

carapace.Gen(diagnoseCmd).FlagCompletion(carapace.ActionMap{
"mode": carapace.ActionValues("stats", "all"),
"output-directory": carapace.ActionDirectories(),
})
}

0 comments on commit 05678dd

Please sign in to comment.