Title: Resolve file paths before passing to native commands · Issue #10675 · PowerShell/PowerShell · GitHub
Open Graph Title: Resolve file paths before passing to native commands · Issue #10675 · PowerShell/PowerShell
X Title: Resolve file paths before passing to native commands · Issue #10675 · PowerShell/PowerShell
Description: Summary of the new feature/enhancement On Windows, the ~ is only understood by PowerShell. So if you try: notepad ~\foo.txt, it complains it can't find the file path. On Windows and non-Windows PSDrives have no meaning outside of PowerSh...
Open Graph Description: Summary of the new feature/enhancement On Windows, the ~ is only understood by PowerShell. So if you try: notepad ~\foo.txt, it complains it can't find the file path. On Windows and non-Windows PSD...
X Description: Summary of the new feature/enhancement On Windows, the ~ is only understood by PowerShell. So if you try: notepad ~\foo.txt, it complains it can't find the file path. On Windows and non-Windows...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/10675
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Resolve file paths before passing to native commands","articleBody":"# Summary of the new feature/enhancement\r\n\r\nOn Windows, the `~` is only understood by PowerShell. So if you try: `notepad ~\\foo.txt`, it complains it can't find the file path. On Windows and non-Windows PSDrives have no meaning outside of PowerShell, so you can't do something like `pico temp:/temp.txt` with expectation that you're creating a file in the temp drive.\r\n\r\n# Proposed technical implementation details (optional)\r\n\r\nThe problem is determining if the file path should be resolved or if it's a literal string being passed to the native command. In most cases, it would seem that resolving the path would be fine. Literal strings can have quotes around them making it explicit.","author":{"url":"https://github.com/SteveL-MSFT","@type":"Person","name":"SteveL-MSFT"},"datePublished":"2019-10-01T21:38:17.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/10675/PowerShell/issues/10675"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f8a0414e-379a-c710-3aee-dde4120d22b8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A4D2:3D4855:274CF0:389391:6A5772F1 |
| html-safe-nonce | 95d6dd32b01b78d5b2ed8e573ba8748f0eb3c7f95e2f370069cbe34e0d5cbba2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNEQyOjNENDg1NToyNzRDRjA6Mzg5MzkxOjZBNTc3MkYxIiwidmlzaXRvcl9pZCI6IjEwNTgwMjM2MTk4NzAyOTA2NzMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0588e63cf68eebb2c9752e4c6f706fea86e3b7b2eff7ca6a39bbebe6b19233ac |
| hovercard-subject-tag | issue:501159840 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/10675/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e24829527ffc89c408016115d1ea99988726df403ca8fa64af45ca8920f3f208/PowerShell/PowerShell/issues/10675 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e24829527ffc89c408016115d1ea99988726df403ca8fa64af45ca8920f3f208/PowerShell/PowerShell/issues/10675 |
| og:image:alt | Summary of the new feature/enhancement On Windows, the ~ is only understood by PowerShell. So if you try: notepad ~\foo.txt, it complains it can't find the file path. On Windows and non-Windows PSD... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SteveL-MSFT |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | c0ca805e53f128ba1f966be1d3ccd81d0d1959c7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width