Skip to content

Commit

Permalink
added git-info
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jan 2, 2023
1 parent 8ab2c92 commit b8bf031
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
24 changes: 24 additions & 0 deletions completers/git-info_completer/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package cmd

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

var rootCmd = &cobra.Command{
Use: "git-info",
Short: "Returns information on current repository",
Long: "https://github.com/tj/git-extras/blob/master/Commands.md#git-info",
Run: func(cmd *cobra.Command, args []string) {},
}

func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()

rootCmd.Flags().BoolP("color", "c", false, "Use color for information titles")
rootCmd.Flags().Bool("help", false, "Display help message")
rootCmd.Flags().Bool("no-config", false, "Don't show list all variables set in config file, along with their values")
}
7 changes: 7 additions & 0 deletions completers/git-info_completer/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "github.com/rsteube/carapace-bin/completers/git-info_completer/cmd"

func main() {
cmd.Execute()
}

0 comments on commit b8bf031

Please sign in to comment.