wunderio / radi-cli

CLI interface for the Radi-API
1 stars 2 forks source link

Code Completion for the CLI would be a big advantage #5

Open james-nesbitt opened 7 years ago

james-nesbitt commented 7 years ago

Most tools provide at least bash completion these days. Some ZSH completion would be a high priority for us in wunder.

james-nesbitt commented 7 years ago

The CLI uses a common golang cli helper base : https://github.com/urfave/cli

This helper already provides some functionality for bash completion (https://github.com/urfave/cli#bash-completion) but we have not implemented that.

That said, there is a limit to what completion we should offer, and that limit is not clear yet.

For example, good completions would be:

  1. autocomplete commands and parameters

Wheras risky completions would be:

  1. autocomplete upcloud server name : too easily stalled with a timeout.
james-nesbitt commented 7 years ago

Unfortunately ZSH completion won't be as easy for us, but we can try to get it integrated at some point.

james-nesbitt commented 7 years ago

it appears that the newer versions of our cli have an abstraction for code completion. We can now assign completion functions to each command, which means that we can probably more easily write zsh-completion.

james-nesbitt commented 7 years ago

Our upsrtream CLI library definitely supports zsh and bash completion. What is the priority on this task?

https://github.com/urfave/cli/tree/v2#shell-completion

tharna commented 7 years ago

This is nice to have, but only after we have stable local development environments up and running.

iler commented 7 years ago

I agree with Janne here. For longer run this is important but for now let's concentrate on getting the MVP out :)