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

Include Bash autocompletion scripts #56

Closed
displague opened this issue Jun 15, 2020 · 0 comments · Fixed by #60
Closed

Include Bash autocompletion scripts #56

displague opened this issue Jun 15, 2020 · 0 comments · Fixed by #60

Comments

@displague
Copy link
Member

displague commented Jun 15, 2020

What problem are you facing?

As a user, I find auto-completion scripts help me to identify the available commands and parameters to commands. I can use tab-completion to avoid breaking out of the command I am typing to uncover simple CLI usage details, like the name, spelling, hyphenation, or existence of a particular parameter.

The Packet CLI does not include auto-completion scripts for my shell, Bash.

How can Packet help?

The CLI should include a command to generate the autocomplete scripts. This can be implemented here, taking advantage of spf-13/cobra support for the feature, described here: https://github.com/spf13/cobra/blob/master/shell_completions.md (more here https://github.com/spf13/cobra/blob/master/bash_completions.md).

Once the packet-cli completion bash (equivalent) command exists, make should incorporate this.

The current approach to triggering generators is to set specific environment variables, this experience could be improved as command-line arguments.

displague added a commit to displague/metal-cli that referenced this issue Jul 1, 2020
Shell completion is can now be enabled:
`source <(packet completion bash)`

This PR also updates links in README.md and options in packet.md.

Closes equinix#56

Signed-off-by: Marques Johansson <marques@packet.com>
displague added a commit to displague/metal-cli that referenced this issue Jul 2, 2020
Shell completion is can now be enabled:
`source <(packet completion bash)`

This PR also updates links in README.md and options in packet.md.

Closes equinix#56

Signed-off-by: Marques Johansson <marques@packet.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant