Skip to content

Commit e3a77fe

Browse files
authored
Merge pull request #1464 from rsteube/add-git-info
added git-info
2 parents 67e057d + b8bf031 commit e3a77fe

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package cmd
2+
3+
import (
4+
"github.com/rsteube/carapace"
5+
"github.com/spf13/cobra"
6+
)
7+
8+
var rootCmd = &cobra.Command{
9+
Use: "git-info",
10+
Short: "Returns information on current repository",
11+
Long: "https://github.com/tj/git-extras/blob/master/Commands.md#git-info",
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func Execute() error {
16+
return rootCmd.Execute()
17+
}
18+
func init() {
19+
carapace.Gen(rootCmd).Standalone()
20+
21+
rootCmd.Flags().BoolP("color", "c", false, "Use color for information titles")
22+
rootCmd.Flags().Bool("help", false, "Display help message")
23+
rootCmd.Flags().Bool("no-config", false, "Don't show list all variables set in config file, along with their values")
24+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package main
2+
3+
import "github.com/rsteube/carapace-bin/completers/git-info_completer/cmd"
4+
5+
func main() {
6+
cmd.Execute()
7+
}

0 commit comments

Comments
 (0)