Skip to content

Fix issue with incomplete results when completing paths with wildcards in non-filesystem providers #24757

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

Merged
merged 5 commits into from
Feb 25, 2025

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.

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.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@iSazonov

This comment was marked as outdated.

This comment was marked as outdated.

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.

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

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
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