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

PowerShell completion script broken with PS 7.3 #3312

Open
1 task done
pinkfloydx33 opened this issue Nov 12, 2022 · 0 comments
Open
1 task done

PowerShell completion script broken with PS 7.3 #3312

pinkfloydx33 opened this issue Nov 12, 2022 · 0 comments
Labels
blocked/upstream Blocked by an upstream dependency or issue bug Something isn't working

Comments

@pinkfloydx33
Copy link

Describe the bug

Beginning with PowerShell 7.3, the PowerShell argument completion script no longer works for empty commands (ie. command <tab> or command subcommand <tab>).

Auto complete only works if you begin to type at least one character of the next "phrase" (ie. command s<tab>)

Steps to reproduce

From a PowerShell 7.3 command line, type the following:

flux <tab> # nothing happens! 

Or

flux suspend <tab> # nothing happens! 

Expected behavior

The commands auto-complete:

flux <tab> # auto-completes 'bootstrap' 

Or

flux suspend <tab> # auto-completes 'alerts' 

Screenshots and recordings

No response

OS / Distro

N/A

Flux version

0.36.0

Flux check

N/A

Git provider

No response

Container Registry provider

No response

Additional context

This is actually an issue in the cobra library. It is due to changes in PS 7.3 that corrected a long standing bug in native command argument passing and quoting. Cobra generates a work-around that escapes the quotes surrounding the empty command. In the new default argument passing mode this is invalid.

I have opened an issue there

I originally thought this was an issue with the individual CLI tools I was using and I meant to open the issue here in the Flux repo. However, I dug into the Flux source and discovered the referenced cobra library is what is generating the script.

I figured I'd open the issue here anyways so others don't waste their time, and as a tracking issue to monitor the external library (albeit, likely low priority).

Code of Conduct

  • I agree to follow this project's Code of Conduct
@stefanprodan stefanprodan added bug Something isn't working blocked/upstream Blocked by an upstream dependency or issue labels Nov 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/upstream Blocked by an upstream dependency or issue bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants