Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Filter out the nested modules ofPSReadLine from module name tab completion#24910

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
daxian-dbw merged 3 commits intoPowerShell:masterfromdaxian-dbw:comp-nested-modules
Feb 18, 2025

Conversation

daxian-dbw
Copy link
Member

PR Summary

When doing module name completion such asGet-Module mic<tab> orGet-Module psr<tab>, you will seeMicrosoft.PowerShell.PSReadLine2 as the result of completion.Microsoft.PowerShell.PSReadLine2 is a nested module ofPSReadLine, which shouldn't be returned by completion. It's returned because the completion happens in PSReadLine's context (using PSReadLine'sSessionState as theEngineSessionState) and hence its nested modules are visible to the tab completion.

completion

This PR filters out the nested modules ofPSReadLine from the tab completion results. It's intentional to not hard code the name 'PSReadLine' in the change, so that in case the tab completion is triggered from within a different module, its nested modules can also be filtered out.

PR Checklist

Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

src/System.Management.Automation/engine/CommandCompletion/CompletionCompleters.cs:474

  • [nitpick] The variable name 'nestedModulesToFilterOut' is a bit lengthy and could be simplified to 'filteredNestedModules' for better readability.
HashSet<PSModuleInfo> nestedModulesToFilterOut = null;

@daxian-dbwdaxian-dbw added the CL-GeneralIndicates that a PR should be marked as a general cmdlet change in the Change Log labelJan 31, 2025
@daxian-dbw
Copy link
MemberAuthor

/azp run

@azure-pipelinesAzure Pipelines
Copy link

Azure Pipelines successfully started running 4 pipeline(s).

@microsoft-github-policy-servicemicrosoft-github-policy-servicebot added the Review - NeededThe PR is being reviewed labelFeb 8, 2025
Copy link
Collaborator

@iSazonoviSazonov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM with one style comment.

@iSazonov

This comment was marked as outdated.

@azure-pipelinesAzure Pipelines

This comment was marked as outdated.

@microsoft-github-policy-servicemicrosoft-github-policy-servicebot removed the Review - NeededThe PR is being reviewed labelFeb 15, 2025
@daxian-dbwdaxian-dbw merged commit4d174fc intoPowerShell:masterFeb 18, 2025
39 of 41 checks passed
@daxian-dbwdaxian-dbw deleted the comp-nested-modules branchFebruary 18, 2025 18:13
@microsoft-github-policy-serviceMicrosoft GitHub Policy Service
Copy link
Contributor

microsoft-github-policy-servicebot commentedFeb 18, 2025
edited by unfurl-linksbot
Loading

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

🔗https://aka.ms/PSRepoFeedback

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

Copilot code reviewCopilotCopilot left review comments

@iSazonoviSazonoviSazonov approved these changes

@adityapatwardhanadityapatwardhanAwaiting requested review from adityapatwardhan

@SeeminglyScienceSeeminglyScienceAwaiting requested review from SeeminglyScience

Assignees
No one assigned
Labels
CL-GeneralIndicates that a PR should be marked as a general cmdlet change in the Change Log
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@daxian-dbw@iSazonov

[8]ページ先頭

©2009-2025 Movatter.jp