Skip to content

Commit

Permalink
added gitui
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Dec 15, 2022
1 parent 28b9c80 commit 8a29a04
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 8a29a04

Please sign in to comment.