Delegate based completion for kitty cmd

This commit is contained in:
Kovid Goyal
2022-09-19 12:17:53 +05:30
parent 2cc359ccc8
commit dc403156a9
5 changed files with 42 additions and 2 deletions

View File

@@ -19,6 +19,8 @@ var _ = fmt.Print
func complete_kitty(completions *Completions, word string, arg_num int) {
if arg_num > 1 {
completions.Delegate.NumToRemove = completions.current_cmd.index_of_first_arg + 1 // +1 because the first word is not present in all_words
completions.Delegate.Command = completions.all_words[completions.current_cmd.index_of_first_arg]
return
}
exes := complete_executables_in_path(word)