-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
add rudimentary fish completions for docker network #2066
Conversation
Signed-off-by: Tim Sampson <tim@sampson.fi>
Codecov Report
@@ Coverage Diff @@
## master #2066 +/- ##
=======================================
Coverage 56.78% 56.78%
=======================================
Files 311 311
Lines 21836 21836
=======================================
Hits 12400 12400
Misses 8520 8520
Partials 916 916 |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #2066 +/- ##
=======================================
Coverage 56.78% 56.78%
=======================================
Files 311 311
Lines 21836 21836
=======================================
Hits 12400 12400
Misses 8520 8520
Partials 916 916 |
Thanks! I recall that the completion used to be generated by a script (see a comment in that file); https://github.com/barnybug-archive/docker-fish-completion. That script has been archived though; if updating that script would make it easier to maintain (and update these), we could consider including it in the One problem is that that repository doesn't have a license, so we probably can't just take it, unless @barnybug makes that contribution 🤔 (alternatively, look into contributing a Fish variant to spf13/cobra, and use that for generating; similar to https://github.com/spf13/cobra/blob/master/bash_completions.go) |
Scripting the generation of completions sounds like a much better idea than doing stuff manually. Adding fish completion generation to cobra is outside of my skillset and available freetime. However if @barnybug 's python script needs some nursing I'm happy to help there. Obviously it would need a compatible license to be committed here but as it stands I could update this commit with completions generated from it (assuming getting it working again isn't too much hassle) if that's agreeable for you @thaJeztah ? As a temp workaround, as the fish completions are currently very much out of date. |
Let's get this one merged and work from there, because this changes looks good to me (and at least brings it in a slightly better state). Fish is (unfortunately) less popular than Bash, and gets less care w.r.t. the completions scripts; and without a dedicated person helping with maintaining those scripts, I think generating them would be a good way forward (leaning towards having it integrated into Cobra here, but if we have the python script as intermediate solution works). Our Bash completion scripts have been fully hand-written, which takes a lot of effort but definitely gives a higher quality than generated ones (and we're lucky to have people passionate about maintaining them). With Apple's decision to switch to Let me take a few minutes to write up a tracking issue / epic for things we can work on w.r.t. improving the completion scripts; I'll post a link here once I did so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!!
Btw, I had a little look at cobra and it seems like generated fish completions is almost over the line spf13/cobra#754 |
Signed-off-by: Tim Sampson tim@sampson.fi
- What I did
The fish completions are rather out of date. This ever so slightly improves the situation by including some basically completions for
docker network
(which I happen to use frequently).- How I did it
- How to verify it
Open up a fish shell and try to tab-complete various
docker network
commands- Description for the changelog
improved fish shell completions for docker network.
- A picture of a cute animal (not mandatory but encouraged)
This is my first contribution to docker, I believe I have followed the appropriate guidelines but if I've misread or -understood something apologies beforehand,