mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-19 23:14:55 +02:00
Ensure auto-generated entries such as --help are present for completion by calling Validate()
This commit is contained in:
@@ -186,6 +186,7 @@ func completions(before_cursor, after_cursor string) (ans *cli.Completions) {
|
||||
root := cli.NewRootCommand()
|
||||
c := root.AddSubCommand(&cli.Command{Name: "kitty-tool"})
|
||||
EntryPoint(c)
|
||||
root.Validate()
|
||||
ans = root.GetCompletions(argv, nil)
|
||||
ans.CurrentWordIdx = position_of_last_arg - len(prefix)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user