Well, that didn't take long: within a week of applause for Microsoft's decision to open-source PowerShell, a comment-war has broken out over
curl
andwget
.For those not familiar with these commands: they're open source command line tools for fetching Internet content without a browser. Apart from obvious applications like downloading whole sites (for example as backup), they're also under the hood for a lot of other toolsets (an example the author is familiar with – GIS tools use
curl
and/orwget
to fetch maps from Web services).For some reason, Microsoft's team decided to put aliases for
curl
andwget
in Windows PowerShell – but, as this thread begins, those aliases don't delivercurl
andwget
functionality.The pull request says the aliases should be spiked: "They block use of the commonly used command line tools without providing even an attempt to offer the same functionality. They serve no purpose for PowerShell users but cause confusion and problems to existing
curl
andwget
users."
-- submitted from IRC
(Score: 2) by NotSanguine on Wednesday August 24 2016, @08:29AM
Just to recap: on linux, on the latest pre-release build (6.0.0-alpha.9) there is no collision between any unix tools and PS aliases. The right thing on linux is already done. This change is windows-only.
Worst of both worlds... The people wanting to use Powershell on Windows are those already familiar with Powershell, and they will expect it to behave like the Windows version. Everybody else prefers bash anyway.
As you mentioned, the folks using Powershell on Windows have been using the 'curl' and 'wget' aliases for many years, so presumably those people *expect* those aliases to call the Invoke-WebRequest cmdlet.
However, the potential solutions being bandied about in the Github discussion thread are mostly along the lines of giving folks the option to disable aliases which have collisions with *nix style utilities rather than doing away with the aliases altogether. Powershell defaulting to parsing aliases in scripts is (IMHO) a poor idea, and Microsoft agrees. In fact, they strongly recommend that users do *not* use aliases in scripts, and call the corresponding cmdlets directly instead.
Those who are used to *nix style functionality (whether on Linux/Unix or with Cygwin/MKS/native tools on Windows) are coming late to the game and are flabbergasted at the perceived arrogance of the Powershell devs aliasing their own, inferior cmdlet to those well-known names.
You are correct in that most of us prefer Bash anyway, on Windows or Unix/Linux. Well, at least I do.
No, no, you're not thinking; you're just being logical. --Niels Bohr