Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce CLI completion to getenvoy #115

Open
musaprg opened this issue Mar 3, 2021 · 4 comments
Open

Introduce CLI completion to getenvoy #115

musaprg opened this issue Mar 3, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@musaprg
Copy link
Contributor

musaprg commented Mar 3, 2021

Currently, we have to exec getenvoy fetch to know which version is available before executing getenvoy run. It is a small but actual pain for me. It would be nice to introduce CLI completion (bash-like or zsh-like) to getenvoy, especially getenvoy run. For instance, getenvoy can complete available "flavors" when typed "tab" after getenvoy run.

GetEnvoy uses https://github.com/spf13/cobra, which has a way to generate CLI completion for some popular shells (bash, zsh, fish, PowerShell) 1. It could be done with it.

Footnotes

  1. https://github.com/spf13/cobra/blob/master/shell_completions.md

@musaprg musaprg added the enhancement New feature or request label Mar 3, 2021
@codefromthecrypt
Copy link
Contributor

I have personally found cobra very clunky. I wonder what you think about this? https://github.com/urfave/cli/blob/master/docs/v2/manual.md

@codefromthecrypt
Copy link
Contributor

should be easy to get off cobra now

@codefromthecrypt
Copy link
Contributor

@musaprg @llinder either of you want to try this after #218? here's an example project that bundles auto-completion https://github.com/rliebz/tusk

@codefromthecrypt
Copy link
Contributor

I'm going to deprioritize this for now though someone else can grab it.

Note that auto-completion of built-in commands is usually easier and different than auto-completion of dynamic args (ex envoy versions). In each case, how to install is somewhat shell specific, so testing this well is a fair amount of work unless we punt and assume things just work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants