Repository navigation
Pipeline chain operators - #9849
Conversation
bb535bc to
2e65e5f
Compare
|
The |
|
Discussed this offline with Dongbo Wang (@daxian-dbw). We've decided to get rid of the subordinate statements and move assignment up to the whole chain (so no |
|
Rob Holt (@rjmholt) Can you explain the reasoning in this PR thread? |
I've discussed again with Dongbo Wang (@daxian-dbw) and we agreed this is now best served by an RFC. When that RFC is accepted, I'll make the desired changes in this branch |
|
Please see PowerShell/PowerShell-RFC#192 |
|
Excellent, thanks |
|
🎉 |
|
🎉🎉🎉 Nice! |
|
This is awesome! Looking forward to having a look in PS7 preview 5! |
The `&&` syntax is not supported in PowerShell. See PowerShell/PowerShell#9849.
The `&&` syntax is not supported in PowerShell (yet). See PowerShell/PowerShell#9849.
PowerShell can't be relied upon to have `&&`. PowerShell/PowerShell#9849
PowerShell can't be relied upon to have `&&`. PowerShell/PowerShell#9849
This PR is specified by PowerShell/PowerShell-RFC#192
PR Summary
Resolves #3241.
Implements
&&and||.A statement like
cmd1 && cmd2should behave likecmd1; if ($?) { cmd2 }.After discussion with the @PowerShell/powershell-committee, this feature has the following charateristics:
cmd1 && cmd2behaves likecmd1; if ($?) { cmd2 }cmd1 || cmd2behaves likecmd1; if (-not $?) { cmd2 }cmd1 && cmd2 && cmd3is left associative:[cmd1 && cmd2] && cmd3cmd1 && $(break)). These were taken out due to the inconsitencies they posed at a grammatical, data structure and semantic level.PSPipelineChainOperatorsexperimental featurePR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.PSPipelineChainOperators