This adds initial support for tab completions. Specifically:
A patched fork of the kongplete package. Kongplete makes it easy to add completions to kong, the command-line parsers. We're adding a forked package because it's missing support for command aliases. I submitted a PR about ten weeks ago, but it hasn't received any comments from the maintainer.
A new command, "install-completions" which provides a way to install the completions into your shell environment.
A completion predictor that allows us to complete the names of organizations. Once this PR is accepted, I'll extend it to support names for other objects, like control planes. I limited it to organizations for now to keep this PR small.
How has this code been tested
Manual testing in bash. Kongplete also supports zsh and fish -- we'll verify those later.
Limitations
The way completion works with Kong and Kongplete means that when we do completion predictions, we don't have the results of parsing the command-line. This means that if someone specifies an option like --domain or --profile, we won't use it. Instead we'll use the default profile. For 99% of users, this will be fine. For internal developers switching between environments, they may find that tab completion doesn't use the profile they'd like to use. This is a hard problem to fix, but I think it's a reasonable starting place.
Description
This adds initial support for tab completions. Specifically:
How has this code been tested
Manual testing in bash. Kongplete also supports zsh and fish -- we'll verify those later.
Limitations
The way completion works with Kong and Kongplete means that when we do completion predictions, we don't have the results of parsing the command-line. This means that if someone specifies an option like --domain or --profile, we won't use it. Instead we'll use the default profile. For 99% of users, this will be fine. For internal developers switching between environments, they may find that tab completion doesn't use the profile they'd like to use. This is a hard problem to fix, but I think it's a reasonable starting place.