Implement delegate based completion fof the ssh and hyperlinked_grep kittens

This commit is contained in:
Kovid Goyal
2022-09-19 13:31:32 +05:30
parent fd631bf402
commit 928a4db817
7 changed files with 33 additions and 6 deletions

View File

@@ -122,3 +122,10 @@ func complete_themes(completions *Completions, word string, arg_num int) {
}
}
}
func completion_for_wrapper(wrapped_cmd string) func(*Command, []string, *Completions) {
return func(cmd *Command, args []string, completions *Completions) {
completions.Delegate.NumToRemove = completions.current_word_idx + 1
completions.Delegate.Command = wrapped_cmd
}
}