mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
Start work on readline completions
This commit is contained in:
@@ -51,6 +51,14 @@ func RegisterExeForCompletion(x func(root *Command)) {
|
||||
registered_exes = append(registered_exes, x)
|
||||
}
|
||||
|
||||
func CompletionsForArgv(argv []string) *Completions {
|
||||
var root = NewRootCommand()
|
||||
for _, re := range registered_exes {
|
||||
re(root)
|
||||
}
|
||||
return root.GetCompletions(argv, init_completions["json"])
|
||||
}
|
||||
|
||||
func GenerateCompletions(args []string) error {
|
||||
output_type := "json"
|
||||
if len(args) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user