Skip to content

Conversation

MartinGC94
Copy link
Contributor

@MartinGC94 MartinGC94 commented Jan 9, 2025

PR Summary

Fixes an issue when trying to complete an item in a path as if it was a container in providers that returns the item itself when calling Get-ChildItem on an item. This would make it complete the same item name again like this: Provider::Container1\Item1\<Tab> -> Provider::Container1\Item1\Item1

PR Context

Fixes #24744

PR Checklist

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

We could use a test provider from related issue and compile it with Add-Type. (There are examples in our tests, one or more is in Add-Type.Tests.ps1)

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Review - Needed The PR is being reviewed label Feb 24, 2025
@MartinGC94
Copy link
Contributor Author

Test added. I took inspiration from ImportProvider.Tests.ps1 and copied his .cs code.

@iSazonov

This comment was marked as outdated.

This comment was marked as outdated.

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Feb 25, 2025
@iSazonov

This comment was marked as outdated.

This comment was marked as outdated.

@iSazonov iSazonov enabled auto-merge (squash) February 26, 2025 11:55
@iSazonov iSazonov merged commit 33d4bf5 into PowerShell:master Feb 26, 2025
39 of 41 checks passed
Copy link
Contributor

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

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

🔗 https://aka.ms/PSRepoFeedback

@MartinGC94 MartinGC94 deleted the ProviderCompletionFix branch February 28, 2025 10:40
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.

Tab-completion in custom provider adds spurious repeated path on non-container items
2 participants