Skip to content
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

Module parameter argument completion returns nested module #20127

Open
5 tasks done
ThomasNieto opened this issue Aug 16, 2023 · 6 comments
Open
5 tasks done

Module parameter argument completion returns nested module #20127

ThomasNieto opened this issue Aug 16, 2023 · 6 comments
Labels
Issue-Bug Issue has been identified as a bug in the product Resolution-No Activity Issue has had no activity for 6 months or more WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module WG-Interactive-IntelliSense tab completion

Comments

@ThomasNieto
Copy link
Contributor

Prerequisites

Steps to reproduce

If you try to complete a module parameter for Get-Command or Get-Module it will return nested module, in this example PSReadLine2 is returned.

Get-Command -Module Microsoft.PowerShell.<tab>

Expected behavior

PSReadLine2 is not returned

Actual behavior

PSReadLine2 is returned

Error details

N/A

Environment data

7.4-preview4

Visuals

image

@ThomasNieto ThomasNieto added the Needs-Triage The issue is new and needs to be triaged by a work group. label Aug 16, 2023
@StevenBucher98 StevenBucher98 added Issue-Bug Issue has been identified as a bug in the product WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module labels Aug 28, 2023
@SteveL-MSFT
Copy link
Member

SteveL-MSFT commented Aug 28, 2023

This just seems like a bug as it shouldn't show modules you can't use directly. In the debugger, it's simply running get-module -name and then nested module is being returned. Best I can tell, it's supposed to be using the current runspace.

@iSazonov iSazonov added the WG-Interactive-IntelliSense tab completion label Aug 29, 2023
@iSazonov
Copy link
Collaborator

/cc @MartinGC94

@sdwheeler
Copy link
Collaborator

I reproduced the problem in PowerShell 5.1 with PSReadLine loaded. I ran powershell -noprofile -noninteractive so that PSReadLine would not be loaded. The problem didn't occur. Next I loaded PSReadLine 2.2.0 (to rule out newer versions). The problem returned. So it looks like this is something in the PSReadLine code.

@theJasonHelmick
Copy link
Collaborator

theJasonHelmick commented Sep 13, 2023

Thank you @ThomasNieto for reporting this experience. We agree that normally you don't see nested modules, and that this is a bug. Similar issue here: #16941

@theJasonHelmick theJasonHelmick removed the Needs-Triage The issue is new and needs to be triaged by a work group. label Sep 13, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Resolution-No Activity Issue has had no activity for 6 months or more label Mar 12, 2024
@ThomasNieto
Copy link
Contributor Author

@daxian-dbw could you please move this issue to the PSReadLine repo?

@microsoft-github-policy-service microsoft-github-policy-service bot removed the Resolution-No Activity Issue has had no activity for 6 months or more label Mar 16, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Resolution-No Activity Issue has had no activity for 6 months or more label Sep 13, 2024
Copy link
Contributor

This issue has not had any activity in 6 months, if there is no further activity in 7 days, the issue will be closed automatically.

Activity in this case refers only to comments on the issue. If the issue is closed and you are the author, you can re-open the issue using the button below. Please add more information to be considered during retriage. If you are not the author but the issue is impacting you after it has been closed, please submit a new issue with updated details and a link to this issue and the original.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Bug Issue has been identified as a bug in the product Resolution-No Activity Issue has had no activity for 6 months or more WG-Cmdlets-Utility cmdlets in the Microsoft.PowerShell.Utility module WG-Interactive-IntelliSense tab completion
Projects
None yet
Development

No branches or pull requests

6 participants