mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 22:14:53 +02:00
Move kitty-tool __complete__ to use the new CLI framework
This commit is contained in:
@@ -3,27 +3,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"kitty/tools/cli"
|
||||
"kitty/tools/cmd/at"
|
||||
_ "kitty/tools/cmd/at"
|
||||
"kitty/tools/completion"
|
||||
)
|
||||
|
||||
func main() {
|
||||
var root = cli.CreateCommand(&cobra.Command{
|
||||
Use: "kitty-tool command [command options] [command args]",
|
||||
Short: "Fast, statically compiled implementations for various kitty command-line tools",
|
||||
})
|
||||
root.AddCommand(at.EntryPoint(root))
|
||||
root := cli.NewRootCommand()
|
||||
root.ShortDescription = "Fast, statically compiled implementations for various kitty command-line tools"
|
||||
root.Usage = "command [command options] [command args]"
|
||||
// root.AddCommand(at.EntryPoint(root))
|
||||
|
||||
root.AddCommand(completion.EntryPoint(root))
|
||||
|
||||
cli.Init(root)
|
||||
if err := cli.Execute(root); err != nil {
|
||||
cli.PrintError(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
completion.EntryPoint(root)
|
||||
root.Exec()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user