I'm working on a tool that analyzes CLI tools part of which requires analyzing tab completions
I know how to run a command like so
out, err := exec.Command("git").Output()
if err != nil {
log.Fatal(err)
}
fmt.Printf("The date is %s\n", out)
but how would I get the tab completions for that command programmatically?
I want to be able to programmatically see the completions that would be listed from
git <tab>
Bonus points if you know how to hook into zsh completions!