Skip to content

Conversation

SteveL-MSFT
Copy link
Member

@SteveL-MSFT SteveL-MSFT commented Apr 20, 2020

PR Summary

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

Fix #10675
Fix #11386

PR Checklist

@SteveL-MSFT SteveL-MSFT added the CL-Experimental Indicates that a PR should be marked as an Experimental Feature in the Change Log label Apr 20, 2020
change string comparison to use string static methods
…Binder.cs

Co-Authored-By: Ilya <darpa@yandex.ru>
@SteveL-MSFT
Copy link
Member Author

@PoshChan retry macos

@PoshChan
Copy link
Collaborator

@SteveL-MSFT, successfully started retry of PowerShell-CI-macOS

@SteveL-MSFT
Copy link
Member Author

@PoshChan retry windows

@PoshChan
Copy link
Collaborator

@SteveL-MSFT, successfully started retry of PowerShell-CI-Windows

Copy link

@AndreHS2020 AndreHS2020 left a comment

Choose a reason for hiding this comment

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

Hi

@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Apr 24, 2020
…case for relative pspath, add test case for complex psdrive name
…bing API returns z:\ for just z: which is not correct
@SteveL-MSFT
Copy link
Member Author

@PoshChan please retry windows

@PoshChan
Copy link
Collaborator

@SteveL-MSFT, successfully started retry of PowerShell-CI-Windows

@anmenaga
Copy link

Added doc issue: MicrosoftDocs/PowerShell-Docs#5848

@anmenaga anmenaga merged commit 23b1dd4 into PowerShell:master Apr 27, 2020
@iSazonov iSazonov removed the Documentation Needed in this repo Documentation is needed in this repo label Apr 28, 2020
@iSazonov iSazonov added this to the 7.1.0-preview.3 milestone Apr 28, 2020
@ghost
Copy link

ghost commented May 19, 2020

🎉v7.1.0-preview.3 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CL-Experimental Indicates that a PR should be marked as an Experimental Feature in the Change Log
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emulation of ~ (tilde) expansion for native utilities is incomplete Resolve file paths before passing to native commands
6 participants