Title: Handle ~ in PATH · Issue #11531 · PowerShell/PowerShell · GitHub
Open Graph Title: Handle ~ in PATH · Issue #11531 · PowerShell/PowerShell
X Title: Handle ~ in PATH · Issue #11531 · PowerShell/PowerShell
Description: Steps to reproduce Put any executable (ex. myExe) at the following path: ~/foo/ Add that path to your PATH $env:PATH = "~/foo$([System.IO.Path]::PathSeparator)$env:PATH" Try to tab complete your executable or just run myExe Expected beha...
Open Graph Description: Steps to reproduce Put any executable (ex. myExe) at the following path: ~/foo/ Add that path to your PATH $env:PATH = "~/foo$([System.IO.Path]::PathSeparator)$env:PATH" Try to tab complete your ex...
X Description: Steps to reproduce Put any executable (ex. myExe) at the following path: ~/foo/ Add that path to your PATH $env:PATH = "~/foo$([System.IO.Path]::PathSeparator)$env:PATH" Try to tab comple...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/11531
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Handle ~ in PATH","articleBody":"\u003c!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\nWindows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nThis repository is **ONLY** for PowerShell Core 6 and PowerShell 7+ issues.\r\n\r\n- Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://docs.microsoft.com/powershell/scripting/whats-new/known-issues-ps6?view=powershell-6).\r\n\r\n-->\r\n\r\n# Steps to reproduce\r\n\r\n1. Put any executable (ex. `myExe`) at the following path: `~/foo/`\r\n1. Add that path to your PATH\r\n```powershell\r\n$env:PATH = \"~/foo$([System.IO.Path]::PathSeparator)$env:PATH\"\r\n```\r\nTry to tab complete your executable or just run `myExe`\r\n\r\n# Expected behavior\r\n\r\nThe executable `myExe` is run.\r\n\r\nThis works just fine in bash and zsh and things like .NET global tools rely on the `~` support in the PATH so we should really fix this.\r\n\r\n## caveat\r\n\r\nBash seems to do more - it can handle variables inside of the PATH but that seems like overkill and I can't think of any example that uses that \"feature\".\r\n\r\nWe handle tilda pretty much everywhere else, we should be able to support it in application resolution.\r\n\r\n# Actual behavior\r\n\r\n```none\r\nThe term 'myExe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.\r\n```\r\n\r\n# Environment data\r\n\r\n\u003c!-- provide the output of $PSVersionTable -->\r\n\r\n```none\r\nName Value\r\n---- -----\r\nPSVersion 7.0.0-daily.20200108\r\nPSEdition Core\r\nGitCommitId 7.0.0-daily.20200108\r\nOS Darwin 18.7.0 Darwin Kernel Version 18.7.0: Sun Dec 1 18:59:03 PST 2019; root:xnu-4903.278.19~1/RELEASE_X86_64\r\nPlatform Unix\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n\r\n","author":{"url":"https://github.com/TylerLeonhardt","@type":"Person","name":"TylerLeonhardt"},"datePublished":"2020-01-08T22:54:02Z","url":"https://github.com/PowerShell/PowerShell/issues/11531"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:bf473430-15b3-4daa-9aa3-518b41f95564 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B4DE:176800:BF9846:109BB73:6AFD44C6 |
| html-safe-nonce | adc9eb34fb95e6d1f3325969e9308263f1d36c6272b81ad9f885d7d94b7b359c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNERFOjE3NjgwMDpCRjk4NDY6MTA5QkI3Mzo2QUZENDRDNiIsInZpc2l0b3JfaWQiOiIxNzkwMTY5OTMzNzU5Njg2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 3589f50b49f00d4dce73319bcd69a318cf95ba87b13219040313ee2ebb33ce70 |
| hovercard-subject-tag | issue:547149948 |
| 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/11531/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ae687a2513d5cfc74cb2bd8f7e546b543a866843b60e0a9c8f2e328c54899405/PowerShell/PowerShell/issues/11531 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ae687a2513d5cfc74cb2bd8f7e546b543a866843b60e0a9c8f2e328c54899405/PowerShell/PowerShell/issues/11531 |
| og:image:alt | Steps to reproduce Put any executable (ex. myExe) at the following path: ~/foo/ Add that path to your PATH $env:PATH = "~/foo$([System.IO.Path]::PathSeparator)$env:PATH" Try to tab complete your ex... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | TylerLeonhardt |
| hostname | github.com |
| expected-hostname | github.com |
| None | bdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474 |
| 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 | 556dd37bb0aceffb25724e151b5d858b3265b40b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width