Skip to content

Commit

Permalink
Merge pull request #1948 from rsteube/git-bugreport
Browse files Browse the repository at this point in the history
git: bugreport
  • Loading branch information
rsteube authored Oct 31, 2023
2 parents 2eddafe + 0d11e9d commit 8605049
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions completers/git_completer/cmd/bugreport.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var bugreportCmd = &cobra.Command{
Use: "bugreport",
Short: "Collect information for user to file a bug report",
Run: func(cmd *cobra.Command, args []string) {},
GroupID: groups[group_interrogator].ID,
}

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

bugreportCmd.Flags().String("diagnose", "", "Create a zip archive of supplemental information about the user’s machine")
bugreportCmd.Flags().Bool("no-diagnose", false, "Create a zip archive of supplemental information about the user’s machine")
bugreportCmd.Flags().StringP("output-directory", "o", "", "Place the resulting bug report file in <path> instead of the current directory")
bugreportCmd.Flags().StringP("suffix", "s", "", "Specify an alternate suffix for the bugreport name")
rootCmd.AddCommand(bugreportCmd)

bugreportCmd.Flag("diagnose").NoOptDefVal = " "

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

0 comments on commit 8605049

Please sign in to comment.