Skip to content

Commit

Permalink
Merge pull request #2512 from carapace-sh/git-diagnose
Browse files Browse the repository at this point in the history
git: diagnose
  • Loading branch information
rsteube authored Aug 17, 2024
2 parents a0d30b0 + 05678dd commit c07d3ca
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 c07d3ca

Please sign in to comment.