From 8444cebc72ae48350fa031b2f5d02c077d865f6b Mon Sep 17 00:00:00 2001 From: rsteube Date: Sat, 11 Jan 2025 21:03:31 +0100 Subject: [PATCH] added btop --- completers/btop_completer/cmd/root.go | 30 +++++++++++++++++++++++++++ completers/btop_completer/main.go | 7 +++++++ 2 files changed, 37 insertions(+) create mode 100644 completers/btop_completer/cmd/root.go create mode 100644 completers/btop_completer/main.go diff --git a/completers/btop_completer/cmd/root.go b/completers/btop_completer/cmd/root.go new file mode 100644 index 000000000..e647a3148 --- /dev/null +++ b/completers/btop_completer/cmd/root.go @@ -0,0 +1,30 @@ +package cmd + +import ( + "github.com/carapace-sh/carapace" + "github.com/spf13/cobra" +) + +var rootCmd = &cobra.Command{ + Use: "btop", + Short: "A monitor of resources", + Long: "https://github.com/aristocratos/btop", + Run: func(cmd *cobra.Command, args []string) {}, +} + +func Execute() error { + return rootCmd.Execute() +} +func init() { + carapace.Gen(rootCmd).Standalone() + + rootCmd.Flags().Bool("debug", false, "start in DEBUG mode") + rootCmd.Flags().BoolP("help", "h", false, "show this help message and exit") + rootCmd.Flags().BoolP("low-color", "lc", false, "disable truecolor") + rootCmd.Flags().StringP("preset", "p", "", "start with preset") + rootCmd.Flags().Bool("tty_off", false, "force (OFF) tty mode") + rootCmd.Flags().BoolP("tty_on", "t", false, "force (ON) tty mode") + rootCmd.Flags().StringP("update", "u", "", "set the program update rate in milliseconds") + rootCmd.Flags().Bool("utf-force", false, "force start even if no UTF-8 locale was detected") + rootCmd.Flags().BoolP("version", "v", false, "show version info and exit") +} diff --git a/completers/btop_completer/main.go b/completers/btop_completer/main.go new file mode 100644 index 000000000..4f9ad9eef --- /dev/null +++ b/completers/btop_completer/main.go @@ -0,0 +1,7 @@ +package main + +import "github.com/carapace-sh/carapace-bin/completers/btop_completer/cmd" + +func main() { + cmd.Execute() +}