René's URL Explorer Experiment


Title: Make the stop-parsing symbol (--%) work on Unix · Issue #3733 · PowerShell/PowerShell · GitHub

Open Graph Title: Make the stop-parsing symbol (--%) work on Unix · Issue #3733 · PowerShell/PowerShell

X Title: Make the stop-parsing symbol (--%) work on Unix · Issue #3733 · PowerShell/PowerShell

Description: Related: #3734 For the stop-parsing symbol, --%, to work sensibly on Unix: [preferably] either: /bin/sh, the default shell, must be invoked, passing it a command line as a single string via -c. As a - in my view beneficial - side effect,...

Open Graph Description: Related: #3734 For the stop-parsing symbol, --%, to work sensibly on Unix: [preferably] either: /bin/sh, the default shell, must be invoked, passing it a command line as a single string via -c. As ...

X Description: Related: #3734 For the stop-parsing symbol, --%, to work sensibly on Unix: [preferably] either: /bin/sh, the default shell, must be invoked, passing it a command line as a single string via -c. As ...

Opengraph URL: https://github.com/PowerShell/PowerShell/issues/3733

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make the stop-parsing symbol (--%) work on Unix ","articleBody":"\u003csup>Related: #3734 \u003c/sup>\r\n\r\nFor the stop-parsing symbol, `--%`, to work sensibly on Unix:\r\n\r\n* [preferably] _either_: `/bin/sh`, the default shell, must be invoked, passing it a command line as a single string via `-c`.  \r\nAs a - in my view beneficial - side effect, `sh` would perform _globbing_ on unquoted tokens.\r\n\r\n* _or_: PowerShell must still first interpret the tokens of the pass-through command line to strip syntactical quoting, in addition to expanding environment/shell variable references.  \r\nThat may still run afoul of users' expectation that _globbing_ should be performed.\r\n\r\nNote: On _Windows_ PowerShell can get away with only expanding `%\u003cname>%`-style environment-variable references and then invoking the target utility _without shell involvement_, but that's not an option on Unix, where the shell is expected to perform tokenization up front and pass an _array_ of _literal_ arguments instead (with syntactical elements such as quoting characters removed).\r\n\r\nTo illustrate the problem with the current behavior (run the commands on a _Unix_ platform):\r\n\r\n```powershell\r\n> /bin/echo --% 'hi, mom'\r\n'hi mom'   # The enclosing single quotes were treated as *literals*\r\n```\r\n\r\nTrying to pass an `awk` command that from `sh` looks like this: `awk -F\\\" 'BEGIN { print \"hi, mom\" }'`\r\n\r\n```powershell\r\n> awk --% -F\\\" 'BEGIN { print \"hi, mom\" }'\r\n/usr/bin/awk: syntax error at source line 1\r\n context is\r\n\t >>> ' \u003c\u003c\u003c \r\n/usr/bin/awk: bailing out at source line 1\r\n```\r\n\r\nThe array of arguments getting passed to `awk` breaks down as follows (`$\u003cn>` represents the nth positional argument):\r\n\r\n```none\r\n$1=[-F\"]\r\n$2=['BEGIN]\r\n$3=[{]\r\n$4=[print]\r\n$5=[hi, mom]\r\n$6=[}']\r\n```\r\n\r\nAs you can see, the intended argument boundaries weren't respected, and the `'` quoting characters were retained.\r\n\r\nIn fact, there's currently no way to make the above command work with `--%`, because no one is interpreting the quoting and removing the syntactical quoting characters.\r\n\r\nCurrently, only the following truly Byzantine invocation - _not_ involving `--%` - can make the above `awk` command work:\r\n\r\n```powershell\r\n/bin/sh -c \"awk -F\\\\\\`\" 'BEGIN { print \\`\"hi, mom\\`\" }'\"\r\n```\r\n\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\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2017-05-08T21:31:06Z","url":"https://github.com/PowerShell/PowerShell/issues/3733"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:94ed501d-5fe1-bd3b-61f2-7774f33ec21e
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9C7C:2CE118:2710CB3:367D63F:6AFD49BB
html-safe-nonce55ec6498b3c276c38ff74ee75802f7c800bf574783a50c5dd78a1edd631eb724
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzdDOjJDRTExODoyNzEwQ0IzOjM2N0Q2M0Y6NkFGRDQ5QkIiLCJ2aXNpdG9yX2lkIjoiNzU5NTA2MzM3NDk0MDI2NjgzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1542a97cbc74f3b177f4f1fe31edd9d078d496ea6c44a95aa012fbf7ffd8a1c6
hovercard-subject-tagissue:227180792
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/3733/issue_layout
twitter:imagehttps://opengraph.githubassets.com/544d5b6ad45a4c3772c68700c635c5d70f6d3a7c652b0491afe20b8a83b259bc/PowerShell/PowerShell/issues/3733
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/544d5b6ad45a4c3772c68700c635c5d70f6d3a7c652b0491afe20b8a83b259bc/PowerShell/PowerShell/issues/3733
og:image:altRelated: #3734 For the stop-parsing symbol, --%, to work sensibly on Unix: [preferably] either: /bin/sh, the default shell, must be invoked, passing it a command line as a single string via -c. As ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemklement0
hostnamegithub.com
expected-hostnamegithub.com
None66653c2e55a6fff2930be1bdf07ee4f8aa137e3956d056c822563be6f878755e
turbo-cache-controlno-preview
go-importgithub.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id49609581
octolytics-dimension-repository_nwoPowerShell/PowerShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id49609581
octolytics-dimension-repository_network_root_nwoPowerShell/PowerShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb6f01f7cb9f35f8c09949773241a3d49dd04b340
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/PowerShell/PowerShell/issues/3733#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F3733
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPowerShell%2Fissues%2F3733
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=PowerShell%2FPowerShell
Reloadhttps://github.com/PowerShell/PowerShell/issues/3733
Reloadhttps://github.com/PowerShell/PowerShell/issues/3733
Reloadhttps://github.com/PowerShell/PowerShell/issues/3733
PowerShellhttps://github.com/PowerShell
PowerShellhttps://github.com/PowerShell/PowerShell
Codehttps://github.com/PowerShell/PowerShell
Issues1.3k (1.3k)https://github.com/PowerShell/PowerShell/issues
Pull requests365 (365)https://github.com/PowerShell/PowerShell/pulls
Discussionshttps://github.com/PowerShell/PowerShell/discussions
Actionshttps://github.com/PowerShell/PowerShell/actions
Projectshttps://github.com/PowerShell/PowerShell/projects
Security and quality3 (3)https://github.com/PowerShell/PowerShell/security
Insightshttps://github.com/PowerShell/PowerShell/insights
https://github.com/PowerShell/PowerShell
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/3733
New issuehttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/3733
Make the stop-parsing symbol (--%) work on Unix https://github.com/PowerShell/PowerShell/issues/3733#top
Committee-ReviewedPS-Committee has reviewed this and made a decisionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Committee-Reviewed%22
Resolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Won't%20Fix%22
WG-Interactive-Consolethe console experiencehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Interactive-Console%22
6.0.0-GAhttps://github.com/PowerShell/PowerShell/milestone/27
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on May 8, 2017https://github.com/PowerShell/PowerShell/issues/3733#issue-227180792
#3734https://github.com/PowerShell/PowerShell/issues/3734
Nexthttps://github.com/PowerShell/PowerShell/issues/3733?timeline_page=1
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on May 9, 2017https://github.com/PowerShell/PowerShell/issues/3733#event-1075017786
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
WG-Interactive-Consolethe console experiencehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Interactive-Console%22
on May 9, 2017https://github.com/PowerShell/PowerShell/issues/3733#event-1075017903
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on May 15, 2017https://github.com/PowerShell/PowerShell/issues/3733#event-1082768985
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Bruce Payette (BrucePay)https://github.com/BrucePay
on May 16, 2017https://github.com/PowerShell/PowerShell/issues/3733#event-1084557482
https://github.com/BrucePay
Bruce Payette (BrucePay)https://github.com/BrucePay
on May 17, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-302250794
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on May 23, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-303525321
Bruce Payette (@BrucePay)https://github.com/BrucePay
(POSIX-compliant) shell parameter expansionhttp://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
https://github.com/TSlivede
TSlivedehttps://github.com/TSlivede
on May 24, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-303854726
https://github.com/TSlivede
TSlivedehttps://github.com/TSlivede
on May 24, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-303856001
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on May 24, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-303857846
quote removalhttp://wiki.bash-hackers.org/syntax/quoting
https://github.com/TSlivede
TSlivedehttps://github.com/TSlivede
on May 24, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-303861909
#3734https://github.com/PowerShell/PowerShell/issues/3734
https://github.com/TSlivede
TSlivedehttps://github.com/TSlivede
on May 24, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-303864065
https://github.com/PowerShell/PowerShell-Docs/blob/staging/reference/6/About/about_Parsing.mdhttps://github.com/PowerShell/PowerShell-Docs/blob/staging/reference/6/About/about_Parsing.md
https://github.com/TSlivede
TSlivedehttps://github.com/TSlivede
on May 24, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-303866481
https://github.com/mklement0
Michael Klement (mklement0)https://github.com/mklement0
on May 24, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-303867136
Bruce Payette (@BrucePay)https://github.com/BrucePay
this SO answerhttps://stackoverflow.com/a/31413730/45375
https://github.com/TSlivede
TSlivedehttps://github.com/TSlivede
on May 24, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-303872677
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Review - CommitteeThe PR/Issue needs a review from the PowerShell Committeehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Review%20-%20Committee%22
Committee-ReviewedPS-Committee has reviewed this and made a decisionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Committee-Reviewed%22
Resolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Won't%20Fix%22
Review - CommitteeThe PR/Issue needs a review from the PowerShell Committeehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Review%20-%20Committee%22
on Sep 5, 2017https://github.com/PowerShell/PowerShell/issues/3733#event-1235311567
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
Bruce Payette (BrucePay)https://github.com/BrucePay
on Sep 6, 2017https://github.com/PowerShell/PowerShell/issues/3733#event-1237840516
https://github.com/SteveL-MSFT
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
on Sep 6, 2017https://github.com/PowerShell/PowerShell/issues/3733#issuecomment-327641533
Steve Lee (SteveL-MSFT)https://github.com/SteveL-MSFT
completedhttps://github.com/PowerShell/PowerShell/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Sep 6, 2017https://github.com/PowerShell/PowerShell/issues/3733#event-1237843056
Sign up for freehttps://github.com/signup?return_to=https://github.com/PowerShell/PowerShell/issues/3733
Sign in to commenthttps://github.com/login?return_to=https://github.com/PowerShell/PowerShell/issues/3733
Committee-ReviewedPS-Committee has reviewed this and made a decisionhttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Committee-Reviewed%22
Resolution-Won't FixThe issue won't be fixed, possibly due to compatibility reason.https://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22Resolution-Won't%20Fix%22
WG-Interactive-Consolethe console experiencehttps://github.com/PowerShell/PowerShell/issues?q=state%3Aopen%20label%3A%22WG-Interactive-Console%22
6.0.0-GAhttps://github.com/PowerShell/PowerShell/milestone/27
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.