Skip to content

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

Merged
Ilya (iSazonov) merged 5 commits into
PowerShell:masterfrom
MartinGC94:FixEarlyReturn
Feb 25, 2025
Merged

Ilya (iSazonov) merged 5 commits into
PowerShell:masterfrom
MartinGC94:FixEarlyReturn

Conversation

@MartinGC94

Copy link
Copy Markdown
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 Rain Sallow (/u/ta11ow) (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
Comment thread test/powershell/Host/TabCompletion/BugFix.Tests.ps1 Outdated
@iSazonov

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).

@iSazonov Ilya (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 Ilya (iSazonov) self-assigned this Feb 20, 2025
@iSazonov

Copy link
Copy Markdown
Collaborator

Rain Sallow (/u/ta11ow) (@vexx32) Is anything you want to discuss with WG or we can merge?

@vexx32

Copy link
Copy Markdown
Collaborator

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 Ilya (iSazonov) removed the WG-Engine-Providers built-in PowerShell providers such as FileSystem, Certificates, Registry, etc. label Feb 25, 2025
@iSazonov Ilya (iSazonov) removed the WG-NeedsReview Needs a review by the labeled Working Group label Feb 25, 2025
@iSazonov
Ilya (iSazonov) merged commit a23e30b into PowerShell:master Feb 25, 2025
@microsoft-github-policy-service

microsoft-github-policy-service Bot commented Feb 25, 2025 •

Copy link
Copy Markdown
Contributor

๐Ÿ“ฃ Hey MartinGC94, how did we do? We would love to hear your feedback with the link below! ๐Ÿ—ฃ๏ธ

๐Ÿ”— https://aka.ms/PSRepoFeedback

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
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