KEMBAR78
Wildcard completions in non-filesystem providers return incomplete results · Issue #24756 · PowerShell/PowerShell · GitHub
Skip to content

Wildcard completions in non-filesystem providers return incomplete results #24756

@MartinGC94

Description

@MartinGC94

Prerequisites

Steps to reproduce

Using this code as an example:

$keys = New-Item -Path @(
                'HKCU:\AB1'
                'HKCU:\AB2'
                'HKCU:\AB2\Test'
            )
$res = TabExpansion2 -inputScript 'Get-ChildItem -Path HKCU:\AB?\'

You'd expect to see 'HKCU:\AB2\Test' in the results but it's not there. This is because of an early return in the completion code that skips evaluating the completions for other resolved paths, if any of the previous ones contains no items.

Expected behavior

Results should include `'HKCU:\AB2\Test'`

Actual behavior

Results are empty.

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.5.0-rc.1
PSEdition                      Core
GitCommitId                    7.5.0-rc.1
OS                             Microsoft Windows 10.0.19045
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueWG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.WG-NeedsReviewNeeds a review by the labeled Working Group

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions