-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Powershell completion stopped worked #15527
Comments
@n1hility PTAL |
@goldman7911 so it used to work, but does not anymore? |
Yes, unfortunelly I don't know which version exactly. I used to let Windows in latest version and run winget upgrade --all. |
A friendly reminder that this issue had no activity for 30 days. |
@baude are you still looking at this one? @cdoern was looking for some low-hanging fruit, this looks like one @baude you probably already determined this, but to help point in the right direction, cobra seems to have a bug where it expects program name to not have a dot: https://github.com/spf13/cobra/blob/main/powershell_completions.go#L109 This results in the powershell output:
With powershell, you can't have a dot in env names, needs to look like:
|
A friendly reminder that this issue had no activity for 30 days. |
resolves containers#15527, containers#16499 Signed-off-by: Charlie Doern <cbddoern@gmail.com>
hi @cdoern I see the commit above looks like you have the fix for this. Are you planning to open a PR for this to the cobra project? |
I fixed the bugs that were in the generated script from running I had to zip it because powershell scripts are supported in comments. Sorry for the laziness. |
A temporary workaround would be using a modified command in the $PROFILE instead of the one in the manual.
It just removes the ".exe" that is added after "podman" by cobra, turning "__podman.exeCompleterBlock" into "__podmanCompleterBlock" which doesn't crash. |
Came here with the same issue. Can someone explain why cobra generates the completion specifically for |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
podman completion stopped worked
Steps to reproduce the issue:
podman.exe machi
Describe the results you received:
Describe the results you expected:
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes
Additional environment details (AWS, VirtualBox, physical, etc.):
Microsoft Windows 11 Pro 10.0.22000 N/A compilação 22000
Windows Terminal 1.14.2282.0
Oh My Posh version 8.35.0
pwsh $PROFILE
The text was updated successfully, but these errors were encountered: