{"id":9229,"date":"2016-08-19T00:18:03","date_gmt":"2016-08-18T22:18:03","guid":{"rendered":"https:\/\/daniel.haxx.se\/blog\/?p=9229"},"modified":"2023-03-23T10:06:49","modified_gmt":"2023-03-23T09:06:49","slug":"removing-the-powershell-curl-alias","status":"publish","type":"post","link":"https:\/\/daniel.haxx.se\/blog\/2016\/08\/19\/removing-the-powershell-curl-alias\/","title":{"rendered":"Removing the PowerShell curl alias?"},"content":{"rendered":"\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Windows_PowerShell\">PowerShell<\/a> is a spiced up command line shell made by Microsoft. According to some people, it is a really useful and good shell alternative.<\/p>\n\n\n\n<p>Already a long time ago, we got bug reports from confused users who couldn&#8217;t use <a href=\"https:\/\/curl.haxx.se\/\">curl<\/a> from their PowerShell prompts and it didn&#8217;t take long until we figured out that Microsoft had added aliases for both curl and wget. The alias had the shell instead invoke its own command called &#8220;Invoke-WebRequest&#8221; whenever curl or wget was entered. Invoke-WebRequest being PowerShell&#8217;s own version of a command line tool for fiddling with URLs.<\/p>\n\n\n\n<p>Invoke-WebRequest is of course not anywhere near similar to neither curl nor wget and it doesn&#8217;t support any of the command line options or anything. The aliases really don&#8217;t help users. No user who would want the actual curl or wget is helped by these aliases, and users who don&#8217;t know about the real curl and wget won&#8217;t use the aliases. <strong>They were and remain pointless.<\/strong> But they&#8217;ve remained a thorn in my side ever since. Me knowing that they are there and confusing users every now and then &#8211; not me personally, since I&#8217;m not really a Windows guy.<\/p>\n\n\n\n<p>Fast forward to modern days: Microsoft released <a href=\"https:\/\/github.com\/PowerShell\/PowerShell\">PowerShell as open source on github<\/a> <a href=\"https:\/\/blogs.msdn.microsoft.com\/powershell\/2016\/08\/18\/powershell-on-linux-and-open-source-2\/\">yesterday<\/a>. Without much further ado, I filed a <a href=\"https:\/\/github.com\/PowerShell\/PowerShell\/pull\/1901\">Pull-Request, asking the aliases to be removed<\/a>. It is a minuscule, 4 line patch. It took way longer to git clone the repo than to make the actual patch and submit the pull request!<\/p>\n\n\n\n<p>It took 34 minutes for them to close the pull request:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>&#8220;Those aliases have existed for multiple releases, so removing them would be a breaking change.&#8221;<\/p>\n<\/blockquote>\n\n\n\n<p>To be honest, I didn&#8217;t expect them to merge it easily. I figure they added those aliases for a reason back in the day and it seems unlikely that I as an outsider would just make them change that decision just like this out of the blue.<\/p>\n\n\n\n<p>But the story didn&#8217;t end there. Obviously more Microsoft people gave the PR some attention and more comments were added. Like this:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>&#8220;You bring up a great point. We added a number of aliases for Unix commands but if someone has installed those commands on WIndows, those aliases screw them up.<\/p>\n\n\n\n<p>We need to fix this.&#8221;<\/p>\n<\/blockquote>\n\n\n\n<p>So, maybe it will trigger a change anyway? The story is ongoing&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>PowerShell is a spiced up command line shell made by Microsoft. According to some people, it is a really useful and good shell alternative. Already a long time ago, we got bug reports from confused users who couldn&#8217;t use curl from their PowerShell prompts and it didn&#8217;t take long until we figured out that Microsoft &hellip; <a href=\"https:\/\/daniel.haxx.se\/blog\/2016\/08\/19\/removing-the-powershell-curl-alias\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Removing the PowerShell curl alias?<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7,6,10],"tags":[33,19,234,125],"class_list":["post-9229","post","type-post","status-publish","format-standard","hentry","category-curl","category-floss","category-win","tag-curl-and-libcurl","tag-open-source","tag-wget","tag-windows"],"_links":{"self":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/9229","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/comments?post=9229"}],"version-history":[{"count":8,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/9229\/revisions"}],"predecessor-version":[{"id":22159,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/posts\/9229\/revisions\/22159"}],"wp:attachment":[{"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/media?parent=9229"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/categories?post=9229"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/daniel.haxx.se\/blog\/wp-json\/wp\/v2\/tags?post=9229"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}