-
Notifications
You must be signed in to change notification settings - Fork 939
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
Please add fish tab completion #576
Comments
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Cobra 1.0 provides support for Fish completion: https://github.com/spf13/cobra/blob/v1.0.0/fish_completions.md |
That probably won't help too much since Kubernetes uses Cobra 0.0.5 and it might be a hard sell to to upgrade unless there are already plans to do so. It might serve as an example, but even if you look at kubectl's zsh completion works, if I recall it does not use Cobra's zsh completion, but instead translates bash completion using a series of seds to make it work for zsh. Maybe using zsh as an example, something similar could be done for fish. I don't know much about fish, but if someone wants to work on it, the code would go here:
|
/sig cli |
Helm just moved from Cobra 0.0.5 to 1.0: helm/helm#7904 From my evaluation the changes are minor and backwards-compatible. But I can understand that upgrading may not happen overnight for kubectl.
Zsh pretty much has the same scripting syntax as bash and has bash-completion compatibility support. Fish has nothing of the sort however with a scripting syntax incompatible with bash. I think moving to Cobra 1.0 will be far less effort than developing anything specific to kubectl for fish completion. |
Looks like kubernetes has cobra 1.0.0 now... |
I'll see if I can upgrade the completion to use all shells supported by cobra 1.0.0... /assign |
Nice! Also PowerShell completions do not support custom completions of any form at this time.
Don't do that yet. Cobra 1.0's support for zsh has less functionality than kubectl's current one. For example, again, no support for custom completion. spf13/cobra#1070 brings Zsh completion to the level of bash completions, but will only work with custom completions written in Go. So, until custom completions are modified in kubectl (and the mentioned PR is released), it is better to stay with the current solution for zsh completion. |
@marckhouzam thanks for the heads up. After my last comment I also saw that cobra has a new way to implement dynamic completion, and the old way only works for bash (and zsh in our case since it just modifies bash completion). As part of this, I'll see what it would take to move to the new dynamic completion approach. At first glance it seems like it would be an improvement. Regarding zsh completion, I totally agree now that I looked more into it. I know how long it took to get zsh completion where it is today, so I definitely don't want to do anything to make it worse, so yeah, I'll probably keep zsh they way is and just focus on getting fish working for now. |
@brianpursley if you manage to get rid of the old dynamic completion code to use the new way, not only will it remove bash code that's difficult to maintain and test, but you'll improve fish completion automatically, and eventually you'll be able to move to native zsh completion which provide completion descriptions, which are currently not supported in kubectl's zsh solution. So I fully agree that such an effort would provide value. Thanks! |
/priority backlog |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
For full fish shell completion support, we need to move to go custom completions, which is done in kubernetes/kubernetes#96087. Hopefully that PR can get merged eventually. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
Merging kubernetes/kubernetes#96087 is slowly going forward... /remove-lifecycle stale |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
kubernetes/kubernetes#96087 is merged and kubernetes/kubernetes#92989 is on its way. There is a chance to have it implemented "soon"... /remove-lifecycle stale |
Closed via kubernetes/kubernetes#92989 /close |
@eddiezane: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Fish Completion - Feature Request
Please implement tab completion for the fish shell by building on work done in spf13/cobra#754 or consider shipping automatically generated manpages beforehand.
Unfortunately an earlier feature request (#131) was closed even though the issue had not been addressed. Previous attempts to add completion failed due to the inability to generate them programmatically, but with the changes to cobra referenced above fixing this should be relatively straightforward.
Fish users will appreciate your efforts. Thanks!
Kubernetes version
Related Issues
The text was updated successfully, but these errors were encountered: