Skip to content

Commit

Permalink
Merge pull request #1451 from rsteube/add-gitui
Browse files Browse the repository at this point in the history
added gitui
  • Loading branch information
rsteube authored Dec 15, 2022
2 parents 28b9c80 + 8a29a04 commit d6069b6
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
35 changes: 35 additions & 0 deletions completers/gitui_completer/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package cmd

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

var rootCmd = &cobra.Command{
Use: "gitui",
Short: "blazing fast terminal-ui for git",
Long: "https://github.com/extrawurst/gitui",
Run: func(cmd *cobra.Command, args []string) {},
}

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

rootCmd.Flags().String("bugreport", "", "Generate a bug report")
rootCmd.Flags().StringP("directory", "d", "", "Set the git directory")
rootCmd.Flags().BoolP("help", "h", false, "Print help information")
rootCmd.Flags().BoolP("logging", "l", false, "Stores logging output into a cache directory")
rootCmd.Flags().Bool("polling", false, "Poll folder for changes instead of using file system events")
rootCmd.Flags().StringP("theme", "t", "", "Set the color theme")
rootCmd.Flags().BoolP("version", "V", false, "Print version information")
rootCmd.Flags().StringP("workdir", "w", "", "Set the working directory")

// TODO theme completion
carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
"directory": carapace.ActionDirectories(),
"workdir": carapace.ActionDirectories(),
})
}
7 changes: 7 additions & 0 deletions completers/gitui_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/gitui_completer/cmd"

func main() {
cmd.Execute()
}

0 comments on commit d6069b6

Please sign in to comment.