mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 05:24:20 +02:00
DRYer
This commit is contained in:
@@ -4,8 +4,8 @@ package main
|
||||
|
||||
import (
|
||||
"kitty/tools/cli"
|
||||
"kitty/tools/cmd/at"
|
||||
"kitty/tools/cmd/completion"
|
||||
"kitty/tools/cmd/tool"
|
||||
)
|
||||
|
||||
func main() {
|
||||
@@ -13,9 +13,7 @@ func main() {
|
||||
root.ShortDescription = "Fast, statically compiled implementations for various kitty command-line tools"
|
||||
root.Usage = "command [command options] [command args]"
|
||||
|
||||
// @
|
||||
at.EntryPoint(root)
|
||||
// __complete__
|
||||
tool.KittyToolEntryPoints(root)
|
||||
completion.EntryPoint(root)
|
||||
|
||||
root.Exec()
|
||||
|
||||
17
tools/cmd/tool/main.go
Normal file
17
tools/cmd/tool/main.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// License: GPLv3 Copyright: 2022, Kovid Goyal, <kovid at kovidgoyal.net>
|
||||
|
||||
package tool
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"kitty/tools/cli"
|
||||
"kitty/tools/cmd/at"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
|
||||
func KittyToolEntryPoints(root *cli.Command) {
|
||||
// @
|
||||
at.EntryPoint(root)
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user