-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Command line parameters prefixed /- #12013
Copy link
Copy link
Closed
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
Metadata
Metadata
Assignees
Labels
First-Time-IssueEasy issues first time contributors can work on to learn about this projectEasy issues first time contributors can work on to learn about this projectIssue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productUp-for-GrabsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsUp-for-grabs issues are not high priorities, and may be opportunities for external contributorsWG-Enginecore PowerShell engine, interpreter, and runtimecore PowerShell engine, interpreter, and runtime
This may or may not be intentional.
I was just looking at the code here for completely unrelated reasons:
https://github.com/PowerShell/PowerShell/blob/master/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs#L569
I noticed that (in contrast to Powershell 5.1), a combination of / and - for command line parameters is now allowed.
According to all documentation (in-code and external), one is supposed to pick between
-,--and/, no combination is ever mentioned.However, the flow of the code also allows for
/-.Is this meant to be possible?
Steps to reproduce
Expected behavior
Invalid combination of / and -
Actual behavior
Execution of command
Environment data
PS: I had a hard time searching for this, since symbols are not really searchable in GitHub. Apologies if this issue already exists.