-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
windows completions not working with shopt -s completion_strip_exe #16499
Comments
Please fill out the issue template as requested. Podman does not create the completion scripts, they are generated by the https://github.com/spf13/cobra library. The library simply generates the name based of the program name (podman sets it to argv[0]). I don't think it should know about .exe or any other special extensions. |
ah, right its in cobra, I found it in this repo, https://github.com/containers/podman/blob/main/vendor/github.com/spf13/cobra/bash_completionsV2.go#L356 but did not see it was under vendor. |
Did you check how it works in powershell? |
just tried it now, does not work either, because its just using |
I think you need to run both |
tried both, same issue |
A friendly reminder that this issue had no activity for 30 days. |
I think this must be fixed upstream, spf13/cobra#1853 |
I will work on both this week @n1hility I just got home from finals :) |
resolves containers#15527, containers#16499 Signed-off-by: Charlie Doern <cbddoern@gmail.com>
A friendly reminder that this issue had no activity for 30 days. |
As best as I can see this is something that cobra upstrem must fix. The shell completion scripts are auto generated by this library. |
Ok I think we can close this issue as we wait for this to be fixed in cobra, once it is fixed there podman will get the fix on a vendor. |
In the meantime there is this hacky solution to fix completion : |
its possible to remove the .exe extension to use binaries in windows git bash by specifying shopt -s completion_strip_exe
but podman is not considering that for the completions.
it registers only podman.exe:
complete -o default -F __start_podman.exe podman.exe
it should also inlclude without .exe extension:
complete -o default -F __start_podman.exe podman.exe podman
.The text was updated successfully, but these errors were encountered: