diff --git a/completers/git_completer/cmd/diffIndex.go b/completers/git_completer/cmd/diffIndex.go new file mode 100644 index 0000000000..e5dfce6398 --- /dev/null +++ b/completers/git_completer/cmd/diffIndex.go @@ -0,0 +1,37 @@ +package cmd + +import ( + "github.com/carapace-sh/carapace" + "github.com/carapace-sh/carapace-bin/completers/git_completer/cmd/common" + "github.com/carapace-sh/carapace-bin/pkg/actions/tools/git" + "github.com/spf13/cobra" +) + +var diffIndexCmd = &cobra.Command{ + Use: "diff-index", + Short: "Compare a tree to the working tree or index", + Run: func(cmd *cobra.Command, args []string) {}, + GroupID: groups[group_low_level_interrogator].ID, +} + +func init() { + carapace.Gen(diffIndexCmd).Standalone() + + diffIndexCmd.Flags().StringS("G", "G", "", "look for differences whose patch text contains added/removed lines that match ") + diffIndexCmd.Flags().Bool("default-prefix", false, "use the default source and destination prefixes") + diffIndexCmd.Flags().StringP("ignore-matching-lines", "I", "", "ignore changes whose all lines match ") + diffIndexCmd.Flags().BoolS("m", "m", false, "make git diff-index say that all non-checked-out files are up to date") + diffIndexCmd.Flags().Bool("merge-base", false, "use the merge base between and HEAD") + diffIndexCmd.Flags().Bool("no-relative", false, "do not make the output relative") + diffIndexCmd.Flags().Bool("no-textconv", false, "do not external text conversion filters to be run") + diffIndexCmd.Flags().Bool("quiet", false, "disable all output of the program") + diffIndexCmd.Flags().String("rotate-to", "", "move files before the named to the end") + diffIndexCmd.Flags().String("skip-to", "", "discard the files before the named from the output ") + common.AddDiffFlags(diffIndexCmd) + rootCmd.AddCommand(diffIndexCmd) + + carapace.Gen(diffIndexCmd).PositionalCompletion( + git.ActionRefs(git.RefOption{}.Default()), + carapace.ActionFiles(), + ) +} diff --git a/completers/git_completer/cmd/sh_i18n_generated.go b/completers/git_completer/cmd/sh_i18n_generated.go deleted file mode 100644 index 459f80f395..0000000000 --- a/completers/git_completer/cmd/sh_i18n_generated.go +++ /dev/null @@ -1,19 +0,0 @@ -package cmd - -import ( - "github.com/carapace-sh/carapace" - "github.com/spf13/cobra" -) - -var sh_i18nCmd = &cobra.Command{ - Use: "sh-i18n", - Short: "Git's i18n setup code for shell scripts", - Run: func(cmd *cobra.Command, args []string) {}, - GroupID: groups[group_low_level_helper].ID, -} - -func init() { - carapace.Gen(sh_i18nCmd).Standalone() - - rootCmd.AddCommand(sh_i18nCmd) -} diff --git a/completers/git_completer/cmd/sh_setup_generated.go b/completers/git_completer/cmd/sh_setup_generated.go deleted file mode 100644 index cd90b1a750..0000000000 --- a/completers/git_completer/cmd/sh_setup_generated.go +++ /dev/null @@ -1,19 +0,0 @@ -package cmd - -import ( - "github.com/carapace-sh/carapace" - "github.com/spf13/cobra" -) - -var sh_setupCmd = &cobra.Command{ - Use: "sh-setup", - Short: "Common Git shell script setup code", - Run: func(cmd *cobra.Command, args []string) {}, - GroupID: groups[group_low_level_helper].ID, -} - -func init() { - carapace.Gen(sh_setupCmd).Standalone() - - rootCmd.AddCommand(sh_setupCmd) -}