Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Document passing PSPath to native commands #5848

@anmenaga

Description

@anmenaga

Document new behavior:
PowerShell/PowerShell#12386

Add a new PSNativePSPathResolution Experimental Feature where if a PSDrive is passed to a native command and uses the FileSystem provider, then the resolved file path is passed to the native command. This means something like:

code temp:/test.txt

now works as expected. Also, on Windows, if the path starts with ~, then that will get resolved before passing to a native command. In both cases, the path is normalized to the directory separators for the relevant operating system. Note:

  • if the path is not a psdrive nor ~ (on Windows), then path normalization doesn't occur
  • if the path is in single quotes, then it's not resolved and treated as literal

PR Context

Context of the issue

  • URL to the article (Docs or GitHub URL):

  • Issue affects the following content (check all that apply):

    Cmdlet reference & about_ topics

    • Version 7.x preview content
    • Version 7.0 content
    • Version 6 content
    • Version 5.1 content

    Conceptual articles

    • Fundamental conceptual articles
    • Script sample articles
    • DSC articles
    • Gallery articles
    • JEA articles
    • WMF articles
    • SDK articles
  • Is the issue specific to a platform (Y/N - Win/macOS/Linux):

Metadata

Metadata

Assignees

Labels

area-languageArea - PowerShell syntax and keywords

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions