KEMBAR78
Path completion for `using module` should use the current script filepath if provided by the editor · Issue #19180 · PowerShell/PowerShell · GitHub
Skip to content

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

@MartinGC94

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

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