Skip to content

Wildcard commands aren't auto-completing #153

Description

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.

image

image

image

image

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

image

Cheers,
Trevor Sullivan
https://trevorsullivan.net
https://twitter.com/pcgeek86

Activity

  1. daviwil commented on Apr 25, 2016

    @daviwil
    Contributor

    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!

  2. added this to the 0.6.0 milestone on Apr 25, 2016
  3. daviwil commented on May 11, 2016

    @daviwil
    Contributor

    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.

  4. pcgeek86 commented on May 11, 2016

    @pcgeek86
    ContributorAuthor

    David Wilson (@daviwil) Thanks for discovering the root cause! Hoping they can fix this soon.

  5. modified the milestones: 0.7.0, on Aug 18, 2016
  6. pcgeek86 commented on Jan 30, 2017

    @pcgeek86
    ContributorAuthor

    David Wilson (@daviwil) Any update on this? I'm still encountering this bug. Thanks!

  7. daviwil commented on Jan 30, 2017

    @daviwil
    Contributor

    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.

  8. added this to the 0.10.0 milestone on Jan 30, 2017
  9. 38 remaining items

  10. SydneyhSmith commented on Apr 21, 2020

    @SydneyhSmith
    Collaborator

    Yep, we need to implement this but unfortunately the platform doesnt give us a good mechanism yet.

  11. removed this from the milestone on Jan 26, 2021
  12. MartinGC94 commented on Jun 24, 2025

    @MartinGC94
    Contributor

    It's been 5 years. Has the platform gotten better so this can be added?

  13. JustinGrote commented on Jun 30, 2025

    @JustinGrote
    Collaborator

    MartinGC94 Since it works at the PS command line, we can probably get this to work via the completion API

    Image

    Image

  14. MartinGC94 commented on Jun 30, 2025

    @MartinGC94
    Contributor

    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.

  15. JustinGrote commented on Jun 30, 2025

    @JustinGrote
    Collaborator

    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 microsoft/vscode#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.

  16. JustinGrote commented on Jul 1, 2025

    @JustinGrote
    Collaborator

    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.

  17. added
    Pending: ExternalThis issue is not fixed here, it is fixed in a dependent repo such as PowerShell,PSScriptAnalyzer
    and removed on Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-IntelliSenseIssue-EnhancementA feature request (enhancement).Pending: ExternalThis issue is not fixed here, it is fixed in a dependent repo such as PowerShell,PSScriptAnalyzer

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions