4 ms·
Oh, this is my PR! Also worth taking a look at the RFC[0] and the original issue[1]. Just to address some questions in the comments: These operators had no e
by rjmholt 7y ago
Oh, this is my PR!
Also worth taking a look at the RFC[0] and the original issue[1].
Just to address some questions in the comments:
These operators had no equivalent in PowerShell previously, but they’d always been planned from the outset. If you look at the diffs in the parser, one of the things taken out is a comment where we parse `&&`/`||` saying something like “we should implement this for v3” (I can’t seem to get a link on my phone but don’t have a computer handy). In [1], mklement0 gives an excellent history of the request for these operators. I owe a blog post on this, so hopefully I can expand upon that.
Also, the pwsh/PowerShell thing exists partially because of needing to exist side-by-side with Windows PowerShell and partially because it wasn’t always clear that PowerShell 7 would be the direction of PowerShell into the future.
As a result, pwsh refers to PowerShell 6/7. PowerShell 6 was called PowerShell Core, but since PowerShell 7 has restored compatibility with a lot of Windows functionality, we’ve dropped the Core for PowerShell 7. And since PowerShell 5.1 and below are bound to Windows, they’re now qualified as Windows PowerShell.
Finally, a lot of users call PowerShell `posh`, but that was already the name of a shell in the Linux ecosystem, and after an early lesson with clobbering native utilities with aliases on *nix, the PowerShell team wanted to be good citizens.
Feel free to fire any questions at me too!
[0]: https://github.com/PowerShell/PowerShell-RFC/pull/192 https://github.com/PowerShell/PowerShell-RFC/pull/192
[1]: https://github.com/PowerShell/PowerShell/issues/3241 https://github.com/PowerShell/PowerShell/issues/3241
- nailer 7y ago`node` had something similar - there was already a package called `node` (I think it was something to do with ham radio) on some distros. Did you ever talk to the owner of `posh`? https://www.commandlinux.com/man-page/man1/posh.1.html https://www.commandlinux.com/man-page/man1/posh.1.html Or think about using the `alternatives` system (which handles 'sendmail' 'node' and other shared names)?
- rjmholt 7y ago(Sorry for the late response. Currently on vacation without a laptop.) I wasn’t on the team when that change was made but I think it was discussed in [0]. I’m not certain, but I suspect the reasoning went that a new name was needed to not clash with `powershell.exe` but it wasn’t certain to be `posh`. So unlike `node`, which had a clashing name from the outset, PowerShell never used or owned `posh`, making the choice of `pwsh` a simpler way to avoid clobbering another tool (and the subsequent complexity of the processes you mentioned). [0]: https://github.com/PowerShell/PowerShell/issues/4214 https://github.com/PowerShell/PowerShell/issues/4214