Title: Get-ChildItem: wildcard matching behavior differs between -Path and -Include parameters when using escape characters · Issue #3724 · PowerShell/PowerShell · GitHub
Open Graph Title: Get-ChildItem: wildcard matching behavior differs between -Path and -Include parameters when using escape characters · Issue #3724 · PowerShell/PowerShell
X Title: Get-ChildItem: wildcard matching behavior differs between -Path and -Include parameters when using escape characters · Issue #3724 · PowerShell/PowerShell
Description: Note: Get-Item appears not to be affected, only Get-ChildItem Problem exists on all supported platforms. Wildcard patterns support ` as the escape character to represent literal ` instances in the filename and to escape the following met...
Open Graph Description: Note: Get-Item appears not to be affected, only Get-ChildItem Problem exists on all supported platforms. Wildcard patterns support ` as the escape character to represent literal ` instances in the ...
X Description: Note: Get-Item appears not to be affected, only Get-ChildItem Problem exists on all supported platforms. Wildcard patterns support ` as the escape character to represent literal ` instances in the ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3724
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Get-ChildItem: wildcard matching behavior differs between -Path and -Include parameters when using escape characters","articleBody":"Note: \r\n * `Get-Item` appears not to be affected, only `Get-ChildItem`\r\n * Problem exists on all supported platforms.\r\n\r\nWildcard patterns support `` ` `` as the escape character to represent literal `` ` `` instances in the filename and to escape the following metacharacters: `* ? [ ]`\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\n# Create a file that contains a literal backtick and a literal substring that would be a valid\r\n# sub-pattern if interpreted as a wildcard expression.\r\nNew-Item -Type File 'a`[b]'\r\n\r\n# Match the newly created file using a wildcard expression with suitable escaping.\r\n# The following 2 command should be equivalent, but currently aren't.\r\nGet-ChildItem * -Include 'a```[b`]'\r\nGet-ChildItem -Path 'a```[b`]'\r\n```\r\n\r\n\r\nExpected behavior\r\n-----------------\r\n\r\nBoth `Get-ChildItem` commands should match the newly created file and output information about it.\r\n\r\nActual behavior\r\n---------------\r\n\r\nThe 2nd command unexpectedly fails:\r\n```\r\nGet-ChildItem : Cannot find path '/Users/jdoe/a```[b`]' because it does not exist.\r\n...\r\n```\r\n\r\nAgain, note that `Get-Item` does _not_ exhibit this problem.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n```powershell\r\nPowerShell Core v6.0.0-alpha (v6.0.0-alpha.18) on macOS 10.12.4\r\nPowerShell Core v6.0.0-alpha (v6.0.0-alpha.18) on Ubuntu 16.04.1 LTS\r\nPowerShell Core v6.0.0-alpha (v6.0.0-alpha.18) on Microsoft Windows 10 Pro (64-bit; v10.0.14393)\r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2017-05-07T19:30:52.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/3724/PowerShell/issues/3724"}
| 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:507437ea-e137-85ab-6efd-4d24afd357b6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1E0:1524D4:2C5FB3:3D6DC2:6A59C77E |
| html-safe-nonce | 9ffce963ce62b983e05bfc5b54c1cdbcc5a588c515d26cd68bf6965c934e16cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUUwOjE1MjRENDoyQzVGQjM6M0Q2REMyOjZBNTlDNzdFIiwidmlzaXRvcl9pZCI6IjYzNDkyODQ1NjI0NDQwNzY5MjYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f276506f9520fc39484ef24690b439d719c0fac9ad8fe0e10d5b9ed5dcb0e779 |
| hovercard-subject-tag | issue:226886940 |
| 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/3724/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aa694f8c212a8b3871a32de309c459372ec00ce8d3418a8c9cb1a0cdfab25ebb/PowerShell/PowerShell/issues/3724 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aa694f8c212a8b3871a32de309c459372ec00ce8d3418a8c9cb1a0cdfab25ebb/PowerShell/PowerShell/issues/3724 |
| og:image:alt | Note: Get-Item appears not to be affected, only Get-ChildItem Problem exists on all supported platforms. Wildcard patterns support ` as the escape character to represent literal ` instances in the ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | ba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353 |
| 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 | ab680789ae4a316cdaf0d5a292a1760140931cc4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width