Move implementation of +hold to Go

No need to pay python interpreter startup cost for --hold
This commit is contained in:
Kovid Goyal
2022-12-01 22:34:56 +05:30
parent 38a7fa73e3
commit f5d2c35755
7 changed files with 100 additions and 19 deletions

View File

@@ -10,6 +10,7 @@ import (
"kitty/tools/cmd/clipboard"
"kitty/tools/cmd/edit_in_kitty"
"kitty/tools/cmd/update_self"
"kitty/tools/tui"
)
var _ = fmt.Print
@@ -25,4 +26,14 @@ func KittyToolEntryPoints(root *cli.Command) {
edit_in_kitty.EntryPoint(root)
// clipboard
clipboard.EntryPoint(root)
// __hold_till_enter__
root.AddSubCommand(&cli.Command{
Name: "__hold_till_enter__",
Hidden: true,
OnlyArgsAllowed: true,
Run: func(cmd *cli.Command, args []string) (rc int, err error) {
tui.ExecAndHoldTillEnter(args)
return
},
})
}