mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-14 03:34:30 +00:00
36 lines
1.1 KiB
Go
36 lines
1.1 KiB
Go
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(),
|
|
})
|
|
}
|