Title: Experimental feature PSNativeCommandArgumentPassing breaks the stop-parsing symbol · Issue #15261 · PowerShell/PowerShell · GitHub
Open Graph Title: Experimental feature PSNativeCommandArgumentPassing breaks the stop-parsing symbol · Issue #15261 · PowerShell/PowerShell
X Title: Experimental feature PSNativeCommandArgumentPassing breaks the stop-parsing symbol · Issue #15261 · PowerShell/PowerShell
Description: Related: #15239, #15250, #15276 - see overview in #15143. Seemingly, with experimental feature PSNativeCommandArgumentPassing in effect (and preference variable $PSNativeCommandArgumentPassing set to 'Standard'), --%, the stop-parsing sy...
Open Graph Description: Related: #15239, #15250, #15276 - see overview in #15143. Seemingly, with experimental feature PSNativeCommandArgumentPassing in effect (and preference variable $PSNativeCommandArgumentPassing set ...
X Description: Related: #15239, #15250, #15276 - see overview in #15143. Seemingly, with experimental feature PSNativeCommandArgumentPassing in effect (and preference variable $PSNativeCommandArgumentPassing set ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/15261
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Experimental feature PSNativeCommandArgumentPassing breaks the stop-parsing symbol","articleBody":"Related: #15239, #15250, #15276 - see overview in #15143.\n\nSeemingly, with experimental feature `PSNativeCommandArgumentPassing` in effect (and preference variable `$PSNativeCommandArgumentPassing` set to `'Standard'`), `--%`, the [stop-parsing symbol](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_Parsing) is broken in that it is seemingly _ignored_: escaping of `\"` chars. that follow is now unexpectedly being performed:\n\n\n## Steps to reproduce\n\n[_Update_: The repro below no longer works, since `find` has since been put on the list of CLIs that implicitly trigger legacy argument-passing; however, the problem persists - see #18664]\n\nOn Windows (Unix is affected too, but `--%` doesn't make much sense there anyway):\n\n```powershell\n# This worked up to preview 4.\n'foo' | find --% /v \"\" | Should -Be 'foo'\n```\n\n## Expected behavior\n\nThe test should succeed.\n\n## Actual behavior\n\nThe test fails, because the `\"` chars. are `\\`-escaped:\n\n```none\nAccess denied - \\\\\nInvalidResult: Expected 'foo', but got $null.\n```\n\nIn effect, command line `find /v \"\\\"\\\"\"` is passed behind the scenes - instead of `find /v \"\"`\n\nNote that with _without_ `--%` the command now works (`'foo' | find /v \"\"`, which previously failed).\n\nWhile that is great, `--%` must not be broken.\n\n\n## Environment data\n\n```none\nPowerShell Core 7.2.0-preview.5\n```\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2021-04-17T16:18:38Z","url":"https://github.com/PowerShell/PowerShell/issues/15261"}
| 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:f45988b5-a55a-db7f-e129-c0d10c9808a8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9CAE:30E9CC:A8ABA7:F24273:6AFDA1C1 |
| html-safe-nonce | e9f3a81f6c439f9e1a2662ae16ecfdb41356c61a2a891ad558879e3ab24588e6 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Q0FFOjMwRTlDQzpBOEFCQTc6RjI0MjczOjZBRkRBMUMxIiwidmlzaXRvcl9pZCI6Ijg2NTY1NDU5ODAzMjMwNDU4MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f1f7c1d69d32244bd4501d7eff6b568e04e977ce61c0639f074310d0aad7d3cb |
| hovercard-subject-tag | issue:860445948 |
| 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/15261/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e9c5fe325b9722147b1c6e68fd3bca1bd65a409d3052d95f4d747d3c3474b193/PowerShell/PowerShell/issues/15261 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e9c5fe325b9722147b1c6e68fd3bca1bd65a409d3052d95f4d747d3c3474b193/PowerShell/PowerShell/issues/15261 |
| og:image:alt | Related: #15239, #15250, #15276 - see overview in #15143. Seemingly, with experimental feature PSNativeCommandArgumentPassing in effect (and preference variable $PSNativeCommandArgumentPassing set ... |
| 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 | bc86424ef34a73b386237872800e922d149d65ba907f63d6f150a2dcb8433bea |
| 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 | 927a6c5ab1c32b38830f1b9d3050c0b9e9aa92e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width