Skip to content

Path completion for using module should use the current script filepath if provided by the editor #19180

Closed

Description

@MartinGC94

Summary of the new feature / enhancement

When defining relative paths in using module statements, the relative path is based around the location of the file with the statement, rather than the current location of the shell.
The tab completion should have the same behavior so people don't end up making mistakes when typing out the relative path.
The tab completion already handles this with $PSScriptRoot where editors like VS code can provide PowerShell with the current file path of the file in the editor so I can't imagine it would be too difficult to implement.

Proposed technical implementation details (optional)

No response

Activity

  1. added
    Issue-Enhancementthe issue is more of a feature request than a bug
    Needs-TriageThe issue is new and needs to be triaged by a work group.
    on Feb 19, 2023
  2. microsoft-github-policy-service commented on Feb 27, 2025

    @microsoft-github-policy-service
    Contributor

    📣 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    In-PRIndicates that a PR is out for the issueIssue-Enhancementthe issue is more of a feature request than a bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions