Skip to content

Commit

Permalink
added git-browse-ci (#2536)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube authored Sep 22, 2024
1 parent 14541ad commit ede3402
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
27 changes: 27 additions & 0 deletions completers/git-browse-ci_completer/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/git"
"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "git-browse-ci",
Short: "Opens the current git repository CI page in your default web browser",
Long: "https://github.com/tj/git-extras/blob/master/Commands.md#git-browse-ci",
Run: func(cmd *cobra.Command, args []string) {},
}

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

rootCmd.Flags().Bool("help", false, "show help")

carapace.Gen(rootCmd).PositionalCompletion(
git.ActionRemotes(),
)
}
7 changes: 7 additions & 0 deletions completers/git-browse-ci_completer/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "github.com/carapace-sh/carapace-bin/completers/git-browse-ci_completer/cmd"

func main() {
cmd.Execute()
}

0 comments on commit ede3402

Please sign in to comment.