Closed scop closed 1 year ago
Cobra 1.5.0 addresses the performance issues, see the entries marked with "perf" in the release notes' completion section. This one should be good to go after upgrading to it.
I could submit a PR for that but I suppose with vendoring in use here, it's easier if you can find time to take care of it directly.
upgraded cobra to 1.5.0
Rebased on top of chore/upgrade-cobra-to-1.5.0
Rebased on master; with Cobra 1.6.1 there, this should be ready to roll.
Cobra v1.2.0+ contains a default completion emitter, we could make use of it.
However, the default emitter outputs cobra's "V2" completions, which are a lot slower than the traditional ones, see https://github.com/spf13/cobra/issues/1680. This is relevant for example with hostname completions which may return a lot of entries.
In that sense I actually don't recommend merging this yet, until there's some way to address the slowness. So marking as a draft.