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

[Feature] Shell completions #270

Merged
merged 10 commits into from
Jun 5, 2020
Merged

[Feature] Shell completions #270

merged 10 commits into from
Jun 5, 2020

Conversation

iwilltry42
Copy link
Member

@iwilltry42 iwilltry42 commented Jun 5, 2020

This PR aims to add/improve the shell completions provided by k3d by implementing custom functions.
Since our usage strings are a bit special, at least for zsh we need to use a fork of cobra until spf13/cobra#1070 got merged.

asciicast

@iwilltry42 iwilltry42 added enhancement New feature or request v3 labels Jun 5, 2020
@iwilltry42 iwilltry42 added this to the v3.0 - FROM scratch milestone Jun 5, 2020
@iwilltry42 iwilltry42 self-assigned this Jun 5, 2020
@iwilltry42 iwilltry42 marked this pull request as ready for review June 5, 2020 12:15
@iwilltry42 iwilltry42 merged commit a6976d3 into master Jun 5, 2020
@iwilltry42 iwilltry42 deleted the feature/completions branch June 5, 2020 13:05
@marckhouzam
Copy link

Cool! I actually use k3d to test spf13/cobra#1070 (and many other things). Thanks @iwilltry42 for improving its completion!

@iwilltry42
Copy link
Member Author

@marckhouzam that's super cool :)
Thanks a lot for working on the cobra completion stuff :)
Unfortunately, something is broken in the released binaries of k3d.. it works building them locally though

@marckhouzam
Copy link

@iwilltry42 broken with completion? I'm curious to see what is happening in case it's a big in Cobra. Can you clarify?

@iwilltry42
Copy link
Member Author

@marckhouzam I doubt it's a bug in Cobra 👍
The "broken" thing here was, that shell completion would fail with the issues that your PR fix (in this case it's escaping the brackets in command descriptions) in the builds created by Travis CI while they all work well when I build them on my machine ("Works on my machine", you know? 😬).
So I assume that it's an issue with managing dependencies 🤔

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

Successfully merging this pull request may close these issues.

2 participants