KEMBAR78
Fix issue with incomplete results when completing paths with wildcards in non-filesystem providers by MartinGC94 · Pull Request #24757 · PowerShell/PowerShell · GitHub
Skip to content

Conversation

@MartinGC94
Copy link
Contributor

PR Summary

Replaces an early return with a continue so the completion code continues to evaluate other resolved paths when encountering an empty path.
This resolves scenarios like:

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

where you wouldn't get HKCU:\AB2\Test in the results because AB1 is empty.

PR Context

Fixes: #24756

PR Checklist

@iSazonov

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@vexx32 vexx32 added WG-Engine-Providers built-in PowerShell providers such as FileSystem, Certificates, Registry, etc. WG-NeedsReview Needs a review by the labeled Working Group labels Jan 9, 2025
@iSazonov

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@iSazonov

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Review - Needed The PR is being reviewed label Jan 18, 2025
@iSazonov

This comment was marked as outdated.

@azure-pipelines

This comment was marked as outdated.

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Review - Needed The PR is being reviewed label Feb 19, 2025
@iSazonov
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Feb 20, 2025
@iSazonov iSazonov self-assigned this Feb 20, 2025
@iSazonov
Copy link
Collaborator

@vexx32 Is anything you want to discuss with WG or we can merge?

@vexx32
Copy link
Collaborator

vexx32 commented Feb 24, 2025

As long as you're happy with the tests and behaviour after the fix, I think this is okay to merge, myself. Just wanted to make sure it got a review.

@iSazonov iSazonov removed the WG-Engine-Providers built-in PowerShell providers such as FileSystem, Certificates, Registry, etc. label Feb 25, 2025
@iSazonov iSazonov removed the WG-NeedsReview Needs a review by the labeled Working Group label Feb 25, 2025
@iSazonov iSazonov merged commit a23e30b into PowerShell:master Feb 25, 2025
39 of 41 checks passed
@microsoft-github-policy-service
Copy link
Contributor

microsoft-github-policy-service bot commented Feb 25, 2025

📣 Hey @MartinGC94, how did we do? We would love to hear your feedback with the link below! 🗣️

🔗 https://aka.ms/PSRepoFeedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wildcard completions in non-filesystem providers return incomplete results

3 participants