Skip to content

Commit

Permalink
Merge pull request #1464 from rsteube/add-git-info
Browse files Browse the repository at this point in the history
added git-info
  • Loading branch information
rsteube authored Jan 2, 2023
2 parents 67e057d + b8bf031 commit e3a77fe
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 e3a77fe

Please sign in to comment.