Wildcard commands aren't auto-completing
In the PowerShell ISE, I frequently type partial command names, containing wildcards. For example, to find the command New-AzureRmVirtualNetworkSubnetConfig, I might type *subnet* and hit CTRL + SPACE to invoke Intellisense.
Unfortunately, this isn't currently working in the Visual Studio Code PowerShell Extension.




Here's a screenshot showing it working in PowerShell ISE. Forgive the fading-out Intellisense, due to some issue with screen capture in SnagIt.

Cheers, Trevor Sullivan https://trevorsullivan.net https://twitter.com/pcgeek86
I'll bet that this is an issue on VS Code's side. They add some extra "intelligence" when it comes to gathering completions at the cursor location so they might be throwing out the results that come back from the language server in this case. I'll look into it!
Moving to 0.7.0, definitely looks like an issue on VS Code's side. I see that IntelliSense results are coming back for wildcard completions but they aren't being displayed. Will file a bug at their repo to track this.
@daviwil Thanks for discovering the root cause! Hoping they can fix this soon.
@daviwil Any update on this? I'm still encountering this bug. Thanks!
Nah, too many other high priority issues recently. I'll assign it to the next feature update in case we get a chance to look into it.
@tylerl0706 If we could figure out what's going on here, this would help bring the VSCode development experience in line with the console experience. Let me know if I can help clarify the issue at all.
@daviwil did you ever get the chance to open that issue on VSCode?
I did https://github.com/microsoft/vscode/issues/92433
@TylerLeonhardt your dependent issue was closed, asking you to ask over at the extensions slack for help on it (strangely)
Yep, we need to implement this but unfortunately the platform doesnt give us a good mechanism yet.
It's been 5 years. Has the platform gotten better so this can be added?
@MartinGC94 Since it works at the PS command line, we can probably get this to work via the completion API
Yes. From what I understood of the issue mentioned earlier the LSP is getting the correct results, they just aren't shown in the VS code GUI because of the filter text or something. So my understanding is that either VS code has to make some changes, or the extension has to work around the limitations.
OK, yeah I was reminded now why this doesn't work. The LSP returns the info fine, but vscode has built-in logic that auto-filters anything that doesn't begin with the typed text, I assume so that the highlighting stuff works correctly and not need to put in a bunch of edge-case things there.
In order to fix this AFAIK, we'd have to implement our own completion provider and all the scaffolding required to do that, per https://github.com/microsoft/vscode/issues/92433.
Do we have any examples of this "working" in other languages like python/etc.? If so I can delve their codebase to see how they fixed/worked around it and maybe find a clever solution there.
I delved some more and found the filter code in vscode itself, if I get some time I may attempt a fix PR, but yeah, I wouldn't expect this anytime soon. I don't think it happens with other editors (vim, etc.) though.
Also switching type to Feature/Enhancement from bug since this is technically not a bug, just something ISE does that vscode doesn't.