upbound / up

The @upbound CLI
Apache License 2.0
52 stars 41 forks source link

Initial suport for tab completions #290

Closed AlainRoy closed 1 year ago

AlainRoy commented 1 year ago

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.

jastang commented 1 year ago

Fixes #54