From 6599193d65525867a799d4e886ba4781336f9534 Mon Sep 17 00:00:00 2001 From: Ralf Steube Date: Sun, 22 Sep 2024 11:55:57 +0200 Subject: [PATCH] added git-clear (#2537) --- completers/git-clear_completer/cmd/root.go | 23 ++++++++++++++++++++++ completers/git-clear_completer/main.go | 7 +++++++ 2 files changed, 30 insertions(+) create mode 100644 completers/git-clear_completer/cmd/root.go create mode 100644 completers/git-clear_completer/main.go diff --git a/completers/git-clear_completer/cmd/root.go b/completers/git-clear_completer/cmd/root.go new file mode 100644 index 0000000000..019b51568c --- /dev/null +++ b/completers/git-clear_completer/cmd/root.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "github.com/carapace-sh/carapace" + "github.com/spf13/cobra" +) + +var rootCmd = &cobra.Command{ + Use: "git-clear", + Short: "Rigorously clean up a repository", + Long: "https://github.com/tj/git-extras/blob/master/Commands.md#git-clear", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func Execute() error { + return rootCmd.Execute() +} +func init() { + carapace.Gen(rootCmd).Standalone() + + rootCmd.Flags().BoolP("force", "f", false, "Force the clean, with no warning to the user") + rootCmd.Flags().BoolP("help", "h", false, "show help") +} diff --git a/completers/git-clear_completer/main.go b/completers/git-clear_completer/main.go new file mode 100644 index 0000000000..d1cce67f32 --- /dev/null +++ b/completers/git-clear_completer/main.go @@ -0,0 +1,7 @@ +package main + +import "github.com/carapace-sh/carapace-bin/completers/git-clear_completer/cmd" + +func main() { + cmd.Execute() +}