-
-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1948 from rsteube/git-bugreport
git: bugreport
- Loading branch information
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(), | ||
}) | ||
} |