mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-26 10:12:17 +02:00
Start moving clipboard kitten to kitty-tool
This commit is contained in:
@@ -14,6 +14,8 @@ import (
|
||||
|
||||
var _ = fmt.Print
|
||||
|
||||
type RunFunc = func(cmd *Command, args []string) (int, error)
|
||||
|
||||
type Command struct {
|
||||
Name, Group string
|
||||
Usage, ShortDescription, HelpText string
|
||||
@@ -26,7 +28,7 @@ type Command struct {
|
||||
// If true subcommands are ignored unless they are the first non-option argument
|
||||
SubCommandMustBeFirst bool
|
||||
// The entry point for this command
|
||||
Run func(cmd *Command, args []string) (int, error)
|
||||
Run RunFunc
|
||||
// The completer for args
|
||||
ArgCompleter CompletionFunc
|
||||
// Stop completion processing at this arg num
|
||||
|
||||
18
tools/cmd/clipboard/main.go
Normal file
18
tools/cmd/clipboard/main.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// License: GPLv3 Copyright: 2022, Kovid Goyal, <kovid at kovidgoyal.net>
|
||||
|
||||
package clipboard
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"kitty/tools/cli"
|
||||
)
|
||||
|
||||
var _ = fmt.Print
|
||||
|
||||
func clipboard_main(cmd *cli.Command, args []string) (int, error) {
|
||||
return 0, nil
|
||||
}
|
||||
|
||||
func EntryPoint(parent *cli.Command) {
|
||||
create_cmd(parent, clipboard_main)
|
||||
}
|
||||
@@ -4,8 +4,10 @@ package tool
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"kitty/tools/cli"
|
||||
"kitty/tools/cmd/at"
|
||||
"kitty/tools/cmd/clipboard"
|
||||
"kitty/tools/cmd/edit_in_kitty"
|
||||
"kitty/tools/cmd/update_self"
|
||||
)
|
||||
@@ -21,4 +23,6 @@ func KittyToolEntryPoints(root *cli.Command) {
|
||||
update_self.EntryPoint(root)
|
||||
// edit-in-kitty
|
||||
edit_in_kitty.EntryPoint(root)
|
||||
// clipboard
|
||||
clipboard.EntryPoint(root)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user