mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-05 15:32:53 +00:00
Added tload completer
This commit is contained in:
parent
8371a71c72
commit
77cb8fa9ec
26
completers/tload_completer/cmd/root.go
Normal file
26
completers/tload_completer/cmd/root.go
Normal file
@ -0,0 +1,26 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"github.com/carapace-sh/carapace"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "tload",
|
||||
Short: "graphic representation of system load average",
|
||||
Long: "https://www.man7.org/linux/man-pages/man1/tload.1.html",
|
||||
Run: func(cmd *cobra.Command, args []string) {},
|
||||
}
|
||||
|
||||
func Execute() error {
|
||||
return rootCmd.Execute()
|
||||
}
|
||||
|
||||
func init() {
|
||||
carapace.Gen(rootCmd).Standalone()
|
||||
|
||||
rootCmd.Flags().StringP("delay", "d", "", "update delay in seconds")
|
||||
rootCmd.Flags().BoolP("help", "h", false, "display this help and exit")
|
||||
rootCmd.Flags().StringP("scale", "s", "", "vertical scale")
|
||||
rootCmd.Flags().BoolP("version", "V", false, "output version information and exit")
|
||||
}
|
7
completers/tload_completer/main.go
Normal file
7
completers/tload_completer/main.go
Normal file
@ -0,0 +1,7 @@
|
||||
package main
|
||||
|
||||
import "github.com/carapace-sh/carapace-bin/completers/tload_completer/cmd"
|
||||
|
||||
func main() {
|
||||
cmd.Execute()
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user