Completion: Delegate kitty +complete to kitten

Implement `kitten __complete__ setup` in Go.
Fix zsh completion script to check `kitten`.
This commit is contained in:
pagedown
2023-02-03 18:16:04 +08:00
parent bed4f33be8
commit 370aa3aaa6
8 changed files with 120 additions and 3 deletions

View File

@@ -87,7 +87,7 @@ func EntryPoint(tool_root *cli.Command) {
Name: "__complete__", Hidden: true,
Usage: "output_type [shell state...]",
ShortDescription: "Generate completions for kitty commands",
HelpText: "Generate completion candidates for kitty commands. The command line is read from STDIN. output_type can be one of the supported shells or :code:`json` for JSON output.",
HelpText: "Generate completion candidates for kitty commands. The command line is read from STDIN. output_type can be one of the supported shells: :code:`zsh`, :code:`fish`, :code:`bash`, or :code:`setup` for completion setup script following with the shell name, or :code:`json` for JSON output.",
Run: func(cmd *cli.Command, args []string) (ret int, err error) {
return ret, cli.GenerateCompletions(args)
},