2022-08-25 06:08:04 +03:00
// License: GPLv3 Copyright: 2022, Kovid Goyal, <kovid at kovidgoyal.net>
2022-08-15 05:46:00 +03:00
package main
import (
2023-02-22 04:45:18 +03:00
"os"
2023-03-27 10:36:02 +03:00
"kitty/kittens/ssh"
2022-08-15 05:46:00 +03:00
"kitty/tools/cli"
2022-09-26 05:04:49 +03:00
"kitty/tools/cmd/completion"
2022-09-30 11:30:01 +03:00
"kitty/tools/cmd/tool"
2022-08-15 05:46:00 +03:00
)
func main ( ) {
2023-02-22 04:45:18 +03:00
krm := os . Getenv ( "KITTY_KITTEN_RUN_MODULE" )
os . Unsetenv ( "KITTY_KITTEN_RUN_MODULE" )
switch krm {
case "ssh_askpass" :
ssh . RunSSHAskpass ( )
return
}
2022-09-23 10:00:41 +03:00
root := cli . NewRootCommand ( )
2023-11-11 14:39:23 +03:00
root . ShortDescription = "Fast, statically compiled implementations of various kittens (command line tools for use with kitty)"
root . HelpText = "kitten serves as a launcher for running individual kittens. Each kitten can be run as :code:`kitten command`. The list of available kittens is given below."
2022-09-23 10:00:41 +03:00
root . Usage = "command [command options] [command args]"
2022-11-14 14:06:05 +03:00
root . Run = func ( cmd * cli . Command , args [ ] string ) ( int , error ) {
cmd . ShowHelp ( )
return 0 , nil
}
2022-09-06 10:47:15 +03:00
2022-09-30 11:30:01 +03:00
tool . KittyToolEntryPoints ( root )
2022-09-26 05:04:49 +03:00
completion . EntryPoint ( root )
2022-09-25 09:53:52 +03:00
2022-09-23 10:00:41 +03:00
root . Exec ( )
2022-08-15 05:46:00 +03:00
}