Skip to content

Commit ede3402

Browse files
authored
added git-browse-ci (#2536)
1 parent 14541ad commit ede3402

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/git"
6+
"github.com/spf13/cobra"
7+
)
8+
9+
var rootCmd = &cobra.Command{
10+
Use: "git-browse-ci",
11+
Short: "Opens the current git repository CI page in your default web browser",
12+
Long: "https://github.com/tj/git-extras/blob/master/Commands.md#git-browse-ci",
13+
Run: func(cmd *cobra.Command, args []string) {},
14+
}
15+
16+
func Execute() error {
17+
return rootCmd.Execute()
18+
}
19+
func init() {
20+
carapace.Gen(rootCmd).Standalone()
21+
22+
rootCmd.Flags().Bool("help", false, "show help")
23+
24+
carapace.Gen(rootCmd).PositionalCompletion(
25+
git.ActionRemotes(),
26+
)
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package main
2+
3+
import "github.com/carapace-sh/carapace-bin/completers/git-browse-ci_completer/cmd"
4+
5+
func main() {
6+
cmd.Execute()
7+
}

0 commit comments

Comments
 (0)