Title: Backport PR #9250 into PowerShell 6.x · Issue #10940 · PowerShell/PowerShell · GitHub
Open Graph Title: Backport PR #9250 into PowerShell 6.x · Issue #10940 · PowerShell/PowerShell
X Title: Backport PR #9250 into PowerShell 6.x · Issue #10940 · PowerShell/PowerShell
Description: Currently when using Set-Location (or it's cd alias) the FileSystem provider will use the literal text that is entered. For example: Given a filesystem with following layout: C:\ | + Users + Windows Issuing the following PowerShell comma...
Open Graph Description: Currently when using Set-Location (or it's cd alias) the FileSystem provider will use the literal text that is entered. For example: Given a filesystem with following layout: C:\ | + Users + Window...
X Description: Currently when using Set-Location (or it's cd alias) the FileSystem provider will use the literal text that is entered. For example: Given a filesystem with following layout: C:\ | + Users + Wi...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/10940
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Backport PR #9250 into PowerShell 6.x","articleBody":"Currently when using `Set-Location` (or it's cd alias) the FileSystem provider will use the literal text that is entered. For example:\r\n\r\nGiven a filesystem with following layout:\r\n\r\n``` text\r\nC:\\\r\n |\r\n + Users\r\n + Windows\r\n```\r\n\r\nIssuing the following PowerShell commands results in:\r\n\r\n``` powershell\r\nPS C:\\\u003e cd Users\r\nPS C:\\Users\u003e cd ..\r\nPS C:\\\u003e cd users\r\nPS C:\\users\u003e\r\n```\r\n\r\nNote - The last command used the path `users` instead of the _actual_ name `Users`\r\n\r\nThis contrary to:\r\n\r\n* Using tab completion\r\nTab completion resolves to the name on disk\r\n\r\n* \"magic\" paths like tilde (`~`)\r\n\r\n``` powershell\r\nPS C:\\\u003e cd ~\r\nPS C:\\Users\\glenn.sarti\u003e\r\n```\r\n\r\n* 8.3 Alternate names\r\n\r\n``` powershell\r\nPS C:\\\u003e cd C:\\progra~1\r\nPS C:\\Program Files\u003e\r\n```\r\n\r\nThis can cause issues with child process creation, as the working directory passed to the child process, strictly speaking, does not exist. This is proved simply by calling cmd.exe:\r\n\r\nGiven the filesystem layout example above (`C:\\Users` is the correct name, not `C:\\users`)\r\n\r\n``` powershell\r\nC:\\users\u003e cmd.exe /c cd\r\nC:\\users\r\n```\r\n\r\nNote that cmd.exe outputs the \"invalid\" directory of `C:\\users`\r\n\r\nNote that, while strictly the fault of PowerShell, I have seen other cross-platform tools behave in strange ways (for example Ruby and NodeJS) where they are performing file path operations and raise errors because the current working directory is not what is on disk.\r\n\r\n---\r\n\r\nThis appears to be \"fixed\" in PowerShell 7.x via https://github.com/PowerShell/PowerShell/pull/9250. This issue is to backport these fixes into PowerShell 6.x","author":{"url":"https://github.com/glennsarti","@type":"Person","name":"glennsarti"},"datePublished":"2019-10-30T03:00:13.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/10940/PowerShell/issues/10940"}
| 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:ec49b412-3687-b44d-6036-709a1b773c45 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B5D0:2D3361:2C0102A:3F74715:6A5681BC |
| html-safe-nonce | 9bc472e1f3a64bf2a460aa0965282e128396a174fa084b4ccd5a3d692c7326e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNUQwOjJEMzM2MToyQzAxMDJBOjNGNzQ3MTU6NkE1NjgxQkMiLCJ2aXNpdG9yX2lkIjoiMjM2NDU1NTI0Mzk5ODgzOTIyOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | efaddf646418a77269568cd2145df420af4efa98398f5cbbdcd3b3b88993b998 |
| hovercard-subject-tag | issue:514363879 |
| 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/10940/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4483778c57a1517b460d8bbdb5257a8296424aef556f6a3c26c4e6e30637a17d/PowerShell/PowerShell/issues/10940 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4483778c57a1517b460d8bbdb5257a8296424aef556f6a3c26c4e6e30637a17d/PowerShell/PowerShell/issues/10940 |
| og:image:alt | Currently when using Set-Location (or it's cd alias) the FileSystem provider will use the literal text that is entered. For example: Given a filesystem with following layout: C:\ | + Users + Window... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | glennsarti |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19b5ee9431dcfce15ab4b001d626e4e3a6ba1acb7be814813a52bbebd9a86ef5 |
| 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 | fc131753d059926755b1ab26f13a2c96a692f5d7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width