You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parsing of "-"-prefixed barewords in argument mode is broken #4578
If --prefixed barewords continue to be supported (in principle, bugs notwithstanding), their parsing currently differs from non---prefixed barewords in significant and unexpected ways:
Steps to reproduce
Write-Output-InputObject a
Write-Output-InputObject -a
Write-Output-InputObject -a.ps1
Write-Output-InputObject -a$HOMEWrite-Output-InputObject a$HOME
Expected behavior
a
-a
-a.ps1
-a/home/jdoe
a/home/jdoe
Actual behavior
a
-a
# ERROR: '.ps1' was interpreted as a *separate argument*
Write-Output : A positional parameter cannot be found that accepts argument '.ps1'.
-a$HOME # NOT EXPANDED
a/home/jdoe
Environment data
PowerShell Core v6.0.0-beta.5 on macOS 10.12.6
PowerShell Core v6.0.0-beta.5 on Ubuntu 16.04.3 LTS
PowerShell Core v6.0.0-beta.5 on Microsoft Windows 10 Pro (64-bit; v10.0.15063)
Windows PowerShell v5.1.15063.483 on Microsoft Windows 10 Pro (64-bit; v10.0.15063)
Activity