16 ms·
Curl author asks Microsoft to remove 'curl' and 'wget' aliases from PowerShell
- protomyth 10y agoIs there a list of all the commands they alias? What is the filename of the profile jpsnover is referring to with the work around of adding: Remove-Item Alias:Curl Remove-Item Alias:WGet
- yakk0 10y agoget-alias will list all the aliases on your system. The profile is here (at least in Windows 10, it might be in a different location in other versions): C:\Users\username\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
- Senji 10y ago$profile already points to it.
- jdmichal 10y agoThe `Alias:` listed is a virtual path provider. So just run: Get-ChildItem Alias: For the profile path, it's stored under the variable `$profile`.
- asah 10y agoIANAL but this seems like a pretty clear cut case of copyright infringement, I.e. a situation where an ordinary person might be confused into thinking that PowerShell curl/wget provides the real thing, but does not. Although I suppose that PowerShell could fall under "parody." EDIT: this was sarcasm.
- kuschku 10y agoYou mean trademark infringement.
- jdbernard 10y agoPowerShell isn't copying the curl or wget code. This would be more like trademark infringement but I don't know if curl or wget are registered trademarks. Still not a cool move.
- dublinben 10y agoYou don't need to register a trademark to have trademark protections. If you use a 'mark' in 'trade' and can demonstrate consumer confusion, then you have a case.
- wyldfire 10y agoThat's absolutely not the standard for copyright infringement (under US code). If curl or wget were trademarked, however, it could definitely be "confusingly similar" which would probably make a valid trademark infringement claim.
- dublinben 10y agocurl and wget automatically earn trademark protection simply by using a 'mark' in 'trade.' They do not need to be registered to earn this protection.
- thomasahle 10y agoAlternatively you could see curl not as a program, but part of the shell API. Microsoft has then reimplemented the API. Sure, from the Oracle vs Google case, even this may be infringement, but only in a more anal way.
- erlehmann_ 10y agoThe point is that they have not reimplemented it. If the Microsoft versions of curl and wget were compatible with the original utilities, there would not be any problem.
- saurik 10y agoWhich actually also came up in the Oracle case: Google claimed to be building a compatible implementation of the Java API, but they couldn't come up with a single example of an app that worked on the JVM which could also run on Dalvik, or the other way around: they were pulling the exact same "embrace extend extinguish" stuff with the Java API that Microsoft had with Visual J++. In that case Sun sued Microsoft and won, leading people to cheer from the sidelines.
- opendomain 10y agoWhat you are describing is trademark, not copyright. There is no trademark on 'curl' or 'wget', so there is not legal status to force anyone to remove features based on these names.
- rgbrenner 10y agotrademarks (at least in the US) are acquired automatically when they are used (just like copyrights). you can't use someone else's name just because they didn't file a trademark app.
- ihuman 10y agoAre curl and wget copyrighted? I thought they were free software under a copyleft-style license.
- Sylos 10y agoHe mixed up copyright and trademark, as far as I can tell. And trademarking is then no problem with copylefted software. For example, Linux is trademarked by Linus Torvalds and Firefox is trademarked by Mozilla. And at least in the case of Firefox, it's actually pretty important to have, as otherwise someone could bundle malware with Firefox and offer that for download as "Firefox", with nothing that Mozilla could do about it.
- wyldfire 10y agoYes, their source code is protected by copyright. What does this mean? It means that the people have granted the author of that code a limited-term monopoly on making copies of that source code. In turn, as you said, the author has made it available under a restrictive license requiring redistribution of source. What did Microsoft do? Well, apparently they created aliases that mimicked some subset of the curl/wget behavior for PowerShell. This might allow simple *nix shell scripts to work with little or no porting to PowerShell. The names of the executables are not protected by copyright. Although -- who knows, if APIs can be considered protected by copyright maybe the names of the binaries themselves are a shell-style API. It seems like a case you'd be unlikely to win. :/
- Kihashi 10y agoThat doesn't mean that they aren't copyrighted. It just means that you can freely use them under the terms of their copyright license. If the code for them were not copyrighted (usually referred to as Public Domain), then you could do whatever you wanted with them-- things like making derivative works and using a commercial license.
- Lennie 10y agoLet's be very clear here. This is not true: No copyright notice == Public Domain. Everything You make gets Your copyright by default. This means the default is: nobody can use what You make. You can put other copyright terms on your works by adding a copyright notice. You can put something in the Public Domain by adding a notice to your work. Things can also become Public Domain automatically after a certain amount of time. But that time has been extended several times in the US to something unreasonable: like 75 years after the death of the author. You can thank Disney/Mickey Mouse for that.
- dalke 10y agoThere's a problem with your argument (replacing 'copyright' for 'trademark' as others have pointed out). What level of name protection applies to command-line tools? For example, can the GNU project replace existing Unix tools with their own implementations which have the same executable name?
- wyldfire 10y agoyes, absolutely they can. In fact, they almost certainly DID! GNU's legacy was in creating tools that were compatible reaplcements for Solaris/Unix/etc ones.
- umanwizard 10y agoJust because someone did something without getting sued doesn't necessarily mean it was legal.
- paulmd 10y agoI think you're thinking of trademark infringement. Copyright infringement would be if Microsoft had used GPL'd code (for example) in violation of its license. I don't think there's any suggestion that's the case here. Your contention that there is a "real thing" would have tremendously negative impacts for the Linux/BSD community. Your typical Linux/BSD contains many utilities that share names and functionality with closed-source System-V utilities but are not in fact the "real thing" (in their case, for licensing purposes). Is everyone supposed to go back and purge those just because they aren't perfectly equivalent in options and functionality to the original System-V, lest someone like the SCO group go after them legally? I don't think there's any doubt that PowerShell provides a bad clone of wget and curl, as there are many complaints about it. And as a matter of user-friendliness there should be a way to easily access the real executable if desired (I can't comment either way on if there is, I don't know PowerShell). However, I see Microsoft as just as within their rights to provide a "wget" alias as a Linux distribution is to provide a "ps" utility to their users.
- saurik 10y agoI feel there is a big difference between making a replacement for a tool that comes with a generic name in a suite and replacing an entire tool. If you are going to make a reimplementation of Microsoft's spreadsheet software that is open source, you don't get to call it Excel. If you make a reimplementation of cURL, you also shouldn't get to reuse the name of their project.
- paulmd 10y agoSo again, what is the difference between making a new spreadsheet app and calling it "Excel", and reimplementing a suite of smaller applications and reusing all their same names? Say, how coreutils steals the name of a large number of SysV utilities? It certainly feels like there's some kind of a difference between the two, but I can't put my finger on exactly what puts one into either category. IMO it may simply be a matter of willingness to sue/defend your trademark. AT&T didn't defend their trademark and now it's genericized. To throw extra fuel onto the fire, let's add Oracle v Google into this discussion. To me, the coreutils are almost like the API of a programming language - you string together application calls just like function calls, to produce a useful application. Oracle v Google established that the API itself is not copyrightable. Should an attempt to defend based on trademark of the function names have succeeded? If not, what differentiates the "ls" utility from Excel?
- wyldfire 10y agoAnd in what is starting to seem like a pattern, Microsoft makes a public move to do the Right Thing. >jpsnover commented ... @bagder 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. ... We need to fix this. > Snover is a Technical Fellow at Microsoft & the inventor of Windows PowerShell ... The thread goes on at length about bureaucratic requirements for the change. I guess this is what happens when you hold a bazaar inside the cathedral.
- patrickaljord 10y agoKind of worrying that the inventor of PowerShell could make such a mistake. Reminds be of when rvm used an alias for "cd", which was even worse. Making up alias for popular tools such as cd, curl or wget is always a bad idea both for security and practical reasons since it breaks many tools in non-obvious ways and can be hijacked etc. It's great though that it's being fixed. I installed PS on my ubuntu last night, it works but I don't really see the point in using it on anything but windows. Last thing I need is worry whether my scripts will run on my custom shell script as if running ubuntu didn't come with its own issues to worry about already.
- amyjess 10y ago> Making up alias for popular tools such as cd cd is a shell builtin on every single *nix shell, not an independent tool. Every shell has its own cd implementation.
- dTal 10y agoYou might also add that it's actually impossible to implement cd as a standalone tool - processes cannot change their parent's working directory.
- richardwhiuk 10y agoIt's not pretty, but you can: https://rudd-o.com/linux-and-free-software/the-shell-challenge-changing-another-process-working-directory https://rudd-o.com/linux-and-free-software/the-shell-challen...
- erlehmann_ 10y agoTo me this looks like a twisted version of step two of the “Embrace, extend and extinguish” strategy – creating interoperability problems: https://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish https://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish To recap: 1. Embrace: Development of software substantially compatible with a competing product, or implementing a public standard. 2. Extend: Addition and promotion of features not supported by the competing product or part of the standard, creating interoperability problems for customers who try to use the 'simple' standard. 3. Extinguish: When extensions become a de facto standard because of their dominant market share, they marginalize competitors that do not or cannot support the new extensions.
- wyldfire 10y agoI think Hanlon's razor applies better here than embrace-extend-extinguish.
- erlehmann_ 10y agoMicrosoft has been doing this for a long time: https://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish#Examples https://en.wikipedia.org/wiki/Embrace,_extend_and_extinguish...
- omginternets 10y agoHanlon's razor applies when there is no evidence pointing towards malevolence. There is ample evidence pointing to EEE in the case of Microsoft.
- wyldfire 10y ago"Microsoft" is not some uniform entity. The people who perpetrated this mis-design aren't necessarily related to the decision makers who steered IE/Office/Windows to have the EEE behavior.
- adrusi 10y agoNot a uniform entity, but a real entity with real habits of behavior. You don't have to attribute any malice to the "people who perpetrated this mis-design", Microsoft's bureaucratic structure might just be designed in a way that EEE strategies arise organically. If they people who drove the use of that strategy with older software were rewarded, and held up as examples within the organization, their ideas could be permanently embeded in the nature of the organization itself.
- LTheobald 10y agoI kind of feel sorry for the MS chaps here. They admit it's wrong, say they will try to fix it but it'll take time because of bureaucracy. But then they get attacked in the thread because they are Microsoft. It's sad to see when they are generally trying.
- kohanz 10y agoAgreed. That thread is a mixture of some useful and constructive dialogue and others just "piling on" offering problems without solutions. Those type of commenters would frustrate me to no end.
- jclulow 10y agoThat's basically what happens in open source, once you get enough people in and around your project.
- 2close4comfort 10y agoVery true! When those decisions were made PowerShell was never planned to be run on anything that ran those cmds natively. Now that they have changed the rules this should be expected as they move to a more neutral ground. I would be the 1st to call M$ on being jerks, but in this case give them a break the ship just did a 180 if you setup your furniture a certain why I guess you will have to set it up again...deal with it.
- warfangle 10y agoOn the other hand, curl.exe has been available for five years.
- doikor 10y agoPowerShell was originally designed so that you would mostly just run CmdLets with it so colliding with an actual program wasn't considered an issue. And these aliases haven been available since 2007. They even admitted it them self that it was stupid and needs to be fixed though so just wait I guess? edit: As a separate note I really would like to have versions of curl and wget that actually have all the params working but return the correct PowerShell objects (so the web request result thingie) instead of a String object. Or maybe have it do that with a flag or something.
- laurent123456 10y agoAdditional info in his blog post: https://daniel.haxx.se/blog/2016/08/19/removing-the-powershell-curl-alias/ https://daniel.haxx.se/blog/2016/08/19/removing-the-powershe...
- edc117 10y agoThis seems far less dramatic than the thread is making it out to be.
- mrswag 10y agoWhat was the thought process to add those aliases? "Yes let's implement broken aliases that supersedes actual working windows version of those utilities" ?
- rohan32 10y agoTo help bridge the gap for UNIX users who are switching over - but that being said, it's dumb since I think having the same commands that don't function the same way as the UNIX tools would confuse me more than not having them at all and having to learn a new web request command.
- tobias3 10y agoThey could have just bundled cURL with PowerShell/Windows like macOS does. But NIH, I guess?
- UnoriginalGuy 10y agoPowershell is an object world, cURL is a string utility. You wouldn't want to bundle it, you want people to use Invoke-WebRequest (current cURL alias). The alis just needs to be removed. They should replace it with a manpage that suggests cmdlets for popular UNIX commands if those commands aren't found (e.g. if curl returns "not found" it tacks on, "You could try XYZ cmdlet instead").
- jodrellblank 10y agoPowershell is an object world, cURL is a string utility. You wouldn't want to bundle it, you want people to use Invoke-WebRequest (current cURL alias). Specifically, for non PS users reading, Invoke-WebRequest returns n object with the page content parsed and a live DOM to work with, as well as the request headers and the raw data. It's very convenient. Including curl.exe would not do that.
- JustUhThought 10y agoIt's great to make things better for your users. But that doesn't make it ok to use other's IP to do so. For decades MS has used IP to crush it's competition, so there is absolutely every reason to treat this type of behavior from them as hostile. Is MS gonna give back all the $ Google paid it for Android lawsuits? No? Then it's still just business.
- chatmasta 10y agoThis seems like a similar issue to how `sed` is implemented slightly differently on OSX/Darwin systems and Linux systems. How have those communities dealt with the problem? Or is this a totally off base comparison?
- deleted 10y ago[deleted]
- phicoh 10y agoSed predates Linux (by a very long time). There is an opengroup standard for sed: http://pubs.opengroup.org/onlinepubs/7908799/xcu/sed.html http://pubs.opengroup.org/onlinepubs/7908799/xcu/sed.html As long as the OSX version of sed conforms to the standard there is no problem if it is incompatible in some areas with the GNU version used on Linux.
- blumentopf 10y agoTotally off base. BSD versus GNU conventions.
- JdeBP 10y agoIf you think that that does not, similarly, generate long "But it breaks my scripts!" "Your scripts were wrong." "You should have named the right shell interpreter." "BSD commands are insane." "GNU commands are non-standard." "Are you going to fix all of the scripts that currently rely upon this?" "But this is the de facto standard!" "Have you forgotten about this large userbase over there?" "I don't care what you say, as far as I am concerned this is bash." "I don't care what you say, it's Terminal because I use a terminal to type." "It should be tar." "It should be cpio." "Now it's pax." "What exactly are the options to the 'ps' command?" "Why did you think that you had a command named 'll'?" "No, the superuser's login shell is intentionally the same as it has been for 30 years." "Why does the user manual have a (sometimes little more than a placeholder) note telling me to read something else for the user manual?" "We're settling on info documentation." "No, we're not." "Hey people, I've had a bright idea of documenting everything in HTML and I'm calling it http://cr.yp.to/slashdoc.html http://cr.yp.to/slashdoc.html ." "The compatibility mechanism is of course to put /usr/xpg4/bin in your PATH." "No, that's gmake." "No, that's gawk." "Ah, actually it's mawk." "No, I think it's nawk." "I'm the real ksh!" "I am the real ksh!" "That's because it's the -I option, not the -i option." "We've actually had a non-interactively-usable general-purpose in-place text editor since Bill Joy wrote ex." "But ed is the Unix standard." discussions ... ... then you have not read enough of Usenet, WWW discussion fora, mailing lists, and others. (-:
- viggity 10y agoIsn't there a third way? make the PS versions of curl and wget adhere exactly to the original interface/specs?
- emodendroket 10y agoThat'd introduce the same kind of breaking changes and wouldn't fit with the PS model.
- jboons 10y agoThis would be difficult to do unless you can tell which alias you are coming from in `Invoke-JsonRequest`.
- JeffreySnover 10y agoYes but I think the better solution is to fix the alias problem and then work with Daniel to make it super simple for people on Windows to get his latest/greatest bits. I've reached out to him to start that conversation. Jeffrey Snover [MSFT]
- erlehmann_ 10y agoOfftopic: What I find interesting about this discussion is that comments regarding “Embrace, Extend, Extinguish” and Microsoft's past misbehaviour got upvotes first, then suddenly many downvotes at once. I have seen this earlier on HN with other controversial topics and I do not know what it implies. Is this voting brigading / shilling or just normal behaviour of groups trying to suppress dissenting voices? Also, is this part of why semi-noobs think that HN is turning into reddit?
- toss1941 10y agoDidn't vote either way but the post is a "do you think it's like this?" without presenting any real evidence, which may have been interpreted as them being a bit too pro or con one way or another. The thing that makes this place not-reddit to me is that the discussion is much more technical and more importantly, there are quite often references backing up someone's assertions.
- mseebach 10y ago> Is this voting brigading / shilling or just normal behaviour of groups trying to suppress dissenting voices? Neither. (If anything, perhaps the assumption of malice on the part of people who disagrees with you is what smells like Reddit) The dynamic is something like this: The comment gets up-votes because nothing is easier than hating on Microsoft, and down-votes because it isn't actually insightful at all. You can squint at any action by any company in just the right way and make it look like it's part of "Embrace, Extend, Extinguish". The comment essentially boils down to "Microsoft has done bad things in the past, so they're probably still doing them" with precious little in the way of actual analysis.
- bargl 10y agotl;dr; EEE is overused in many cases and thus not good conversation but this comment does bring a new spin that people can engage in. First for your general question: I think that people get tired of seeing the Embrace, Extend, Extinguish come up in every single thread about Microsoft. It's a simple argument that seems to be overused and an easy grab for votes, or to bash Microsoft. If someone brings something new to the conversation by calling Embrace, Extend, Extinguish then I'm game for listening, but most the time it's just. Microsoft is a wolf in sheeps clothing look look they are Embracing. OH NOOOOOO. Open source? They can ALWAYS change their licenses? Runs on Linux? What are they going to do start offering free Windows 10 upgrades on Linux? Extinguish Extinguish! Microsoft is a huge company, some departments suck and are run by unethical dicks (looking at you Windows 10). Their developer tools have taken some huge steps lately and have had huge success. Visual Studio Code is used by a lot of people who don't like or dislike Windows, some don't even use windows. I'm just kind of done with this argument. Some comments on the OP: This particular "Embrace, Extend, Extinguish" argument does bring something newish to the table calling this particular action one of the steps as foretold by our CS prophets on high. The OP gives a new spin and is on topic and shouldn't (imo) be down voted because it brings out healthy conversation (which is the point of reading comments on HN vs Reddit). If this were Reddit it would have been punnier.
- yitchelle 10y agoI think MSFT needs to try harder at their customer service. Their first response from a human was hard rejection response. lzybkr wrote "We are rejecting this PR as it introduces "Unacceptable Changes", see our breaking change contract." It is not, "let's investigate it where what the problem is and get back to you some feedback.".
- tomswartz07 10y agoTo be fair, a lot of other MSFT-ers jumped in after the fact and pulled the reigns a bit. I bet it was just unfortunate that some neckbeardy level 1 rep was the first to comment on it. I agree, however, that they should work on their inital responses.
- emodendroket 10y agoThey don't even have an obligation to consider outside PRs, let alone provide a reason. It's rather a stretch to say people who want to change the behavior of PowerShell are their main customers.
- nkassis 10y agoDepends what main customers you are thinking off. For this product in particular, it seems these users might be potential customers of powershell. Each product has it's own main customers.
- wolfgke 10y agoThe customers who pay money.
- JeffreySnover 10y agoFYI - we don't charge for PowerShell. Jeffrey Snover [MSFT]
- wolfgke 10y ago
- micro_softy 10y agoOne is always left with the impression Microsoft thinks their users are ignorant, for lack of a better word. Of course, along with all those users who Microsoft treats as ignorant, again for lack of a better word, there are some very sharp people who use Windows -- who will perhaps take offense at any criticism of Microsoft -- no offence intended! (I am just not smart enough to feel confident with Windows myself -- too complicated.) What is amusing to me about this incident is that I imagine Microsoft would argue that "Monad/Powershell" is aimed at its so-called "power users". Apparently these "power users" would not notice or would need something like this? Intentionally or not, Microsoft is targeting beginners, not "power users" -- tactics like this leverage the popularity of the curl and wget programs and at the same time prevent beginners from learning how to use those programs, not to mention the long history behind them. Disclaimer: I prefer nc, socat and tnftp myself; I have no bias in favor of curl or wget.
- JohnMH 10y agoYeah, there were a lot of "power users" working around these aliases. I mean a lot. That's something that was discussed on that pull request, in fact. People definitely noticed.
- UK-AL 10y agoWhat are you talking about? Most powershell users who aren't idiots, now that they aren't the real versions of the commands. They're simply there help people who might know bits of bash.
- umanwizard 10y agocurl and wget have nothing to do with bash
- UK-AL 10y agoBut they are commonly used in bash.
- 10y ago
- moomin 10y agoYou think that's bad. They alias ls as well...
- UK-AL 10y agols is a standard on many different shells, with different implementations.
- hibbelig 10y agoAre there shells where `ls` is a built-in? I just replied to another comment where I wanted to say that I don't mind that the PowerShell version is different because `ls` is a built-in. But then I discovered it's not. So I just used `cd` in that comment...
- Graham67 10y agoCreate a list of tests. Report how many of the tests pass/fail.
- emodendroket 10y agoI don't think you understand the problem.
- mcguire 10y agoI think I may quote this when the periodic "text input/output is stupid" threads come up. "The output of curl.exe (and every other exe or other command external to PowerShell) is System.String. "So changing curl to run curl.exe instead ofInvoke-WebRequest` would break this script because the output type would change."
- theossuary 10y agoThat isn't a reason to go back to only passing strings between processes, that's like saying "I can't assign this string to an integer so all strongly typed languages are stupid."
- emodendroket 10y agoWhat that actually means is that if you change a command so that it runs a totally different program the script would break, which is equally true in a stringly-typed world.
- Jtsummers 10y agoThough in the stringly-typed world, it's when the format changes from: A B C to: A B D C Or some other such thing. Your string processing code (perl, sed, sort, uniq, etc.) expects certain things that have now changed because <reasons> (which may be totally reasonable or unreasonable).
- emodendroket 10y agoYes, but if it's a totally different program there's no real reason to expect the output to be even slightly similar.
- kzisme 10y agoFor the curious here is the authors blog post about it: https://daniel.haxx.se/blog/2016/08/19/removing-the-powershell-curl-alias/ https://daniel.haxx.se/blog/2016/08/19/removing-the-powershe...
- Pxtl 10y agoThe aliases in PowerShell are a pain even for normal operations, because they don't behave like their DOS or Linux counterparts. I mean, the Get-ChildItem is aliased to dir and ls, which makes it discoverable... but it's parameters behave completely differently which just makes it confusing.
- hibbelig 10y agoMaybe `cd` is a shell builtin, so I expect its behavior to change when I change shells. So it's not a problem to have `cd` behave slightly differently in bash, zsh, fish, PowerShell.
- kazinator 10y agoThere is a way to address these things that I'm surprised they don't know about as language designers. For these situations, making a change that breaks people's code, you have a run-time compatibility mechanism. A command line switch or environment variable can tell the language implementation "please behave like version N". Then all changes since N which are backwards incompatible are suppressed. For instance, troublesome commands that were removed make a re-appearance. You can then boldly fix something that is obviously wrong, while still giving any negatively affected users a way to fight any fires. It's not a perfect solution but it placates most of the concern of the form "this is a good all-round fix, but it will break things for some unknown numbers of users". (Users who have to be absolutely sure that their code will work the same way regardless of language interpreter and run-time updates simply have to package their work together with a specific version of those components, and have their code refer to them instead of the standard installation.)
- scott_s 10y agoI imagine they do know about that technique, and like me, they do not like it. It complicates the implementation itself, as well as the interface provided to the user. I generally would rather pick a side: fix the issue and deal with the consequences, or live with the badness because fixing it would be too big of a breaking change.
- kazinator 10y agoIn my experience using the technique in a language implementation, it is a breeze and the interface to the user is unobtrusive. I imagine they don't know about the technique. Engineers who know about rejected alternatives tend to mention them, to avoid the embarrassment of someone else doing it for them.
- scott_s 10y agoImplementing it and presenting it your users once is easy, and not that obtrusive. Doing it N times is not, and the complexity multiplies. It also increases the complexity of support. I see it as avoiding design decisions instead of making them. Since I don't see it as a viable option, I imagine they don't as well - it doesn't take must insight to realize you can provide an external switch to go between two different behaviors.
- emodendroket 10y agoI have to wonder how many people are really trying to run curl and wget from Windows PowerShell and running into a problem. I feel like if you're the kind of person who would do that you are also the kind who could easily configure your environment to get it the way you want. Breaking existing behavior seems like a bigger problem.
- UnoriginalGuy 10y agoYou can bypass this problem by appending ".exe" to the end of your command anyway, as in, "curl.exe" instead of "curl" fixes the alias problem and allows native curl to run. Alternatively you can use a fully qualified path (c:/utils/curl.exe). Technologically it is trivial to bypass the alias. But that doesn't mean the curl/wget people don't have a legit point about trademark usage and or incompatible args between the cmdlet (actually Invoke-WebRequest) and original UNIX utilities.
- emodendroket 10y agoYeah, but the aliases are mostly meant for an interactive scenario where it has real value to be able to just try typing in a command you know and then you can actually look at the docs to understand the details, rather than having to Google "PowerShell equivalent to wget" or whatever.
- douche 10y agoI guess Powershell is going to have to take out all of it's useful aliases... Bye ls, rm, cp, etc
- Senji 10y agoThey should put a flag that's something like $clobber_posix with default state of off.
- mydpy 10y agoThis is kinda awesome. This repo has been public for less than 24 hours and Daniel Stenberg (@bagder) already put in a PR to remove wget and curl? That's amazing. What a Swede.
- hota_mazi 10y agoIt's nice to see the Microsoft people being open to the dialogue but they're in a hard place here. These aliases have been in PowerShell for years, they can't be removed without breaking existing scripts. Anyone who's used PowerShell knows that a lot of commands work differently, even `ls` and `rm`. They have different options, different text format (colors!), different output and different ways to interact with other commands. That's the very definition of PowerShell: structured interchange between commands with real objects instead of fragile strings. wget and curl are no different. They have the names of well known UNIX commands but within PowerShell, they have their own syntax and behavior. It's not unexpected and anyone who uses bash and PowerShell regularly (I kinda do) is used to the differences between these two shells.
- SloopJon 10y agoI'm not too familiar with PowerShell, but I wonder if they could introduce new syntax to fix this. Add a new statement, like import, include, use, or using; if your script includes that statement, you don't get the aliases unless you ask for them (e.g., using LegacyAliases).
- ambulancechaser 10y agoThe problem with that is that it breaks existing scripts. If you have to update old scripts, why try to maintain the legacy stuff in the first place.
- SloopJon 10y agoNo, it doesn't, because existing scripts don't include this new statement. You only have to make your aliases explicit if you edit a script to use this new namespace/module feature.
- williamscales 10y agoVersion pinning? i.e. you specify in your script the version that you will use. Scripts missing the version pinning information run under backwards compatible mode. It...sorta worked for HTML? Over the long run, old pages could be phased out and now we have a pretty nice situation with HTML5.
- somnium_sn 10y agoAll the comments make me incredible sad. Established projects need a valid backwards compatibility policy, this is particular true for shells and programming language to not break existing scripts. People make mistakes and it's been agreed that introducing these aliases years ago was a mistake, albeit I think back then an understandable mistakes, given the idea to bring a shell to windows that has the power of a traditional unix shell. Now people are loudly complaining, laughing, etc but without any constructive feedback that takes the backwards compatibility needs of a tool that is literally shipped to hundreds of million of people into account and stomping RFC approaches that are pretty similar to those in other projects (see PHP RFCs, Python PIPs, etc). Since when did people became so hostile towards open source projects that try to do the right thing?
- UK-AL 10y agoIt's because it Microsoft, it doesn't matter what the issue is. People just want an excuse to bash them.
- plandis 10y agoTo be fair one of the first comments on the issue is some guy from Microsoft saying: "We can't make this change without an RFC. Oh, by the way, the community cannot create an RFC." If I was actually interested in using powershell on Linux I too would be a little upset they Microsoft is so unwilling to work with the community.
- Aldo_MX 10y agoYou are not giving the whole context: > We can't make this change without an RFC. Oh, by the way, the community cannot create an RFC, WE INTEND TO OPEN THIS UP.
- hulpult 10y agoMicrosoft deserves to die a painful death 100 times over for the things it has done.
- 10y ago
- OliverJones 10y agoI wonder if the creators of open source software should claim trademark rights in the names of that software. "curl", "wget", "git", and "nginx", for just four examples, are probably distinctive enough in their areas of use to qualify. If the creators had trademark rights, they could then write "cease-and-desist" letters to ask others to stop using the names in confusing ways. This wouldn't necessarily open up a trademark-troll sinkhole, because the creators of widely used software could, in their licenses, grant the use of the name to implementers of their packages. The best way to claim trademark rights is to register the trademarks. But that's not necessary. (Unrelated: Jeff Snover isn't a creepy guy; he's just trying to do the right thing.)
- deleted 10y ago[deleted]
- asveikau 10y agoTo be honest powershell has always struck me as over engineered, brimming with technological smugness, a solution in search of a problem. Powershell fans get so excited about how their rich CLR object pipeline is so much better than a textual representation that they forget that their shell is basically an unusable theoretical exercise and still blown out of the water by "the real thing". The fact that the designers of this platform would over-extend and try to clone "Unix utilities" (which have had windows ports for multiple decades) but completely oversimplify the purpose of these tools and fail to replicate them accurately - it's no shock to me at all.
- jdright 10y agoPerfectly said, can't agree more.
- andyjohnson0 10y agoSome of the unthinking, reflex accusations of conspiracy by Microsoft that I'm reading here are saddening and a bit disturbing. Somebody decided to add some aliases for convenience. It turns out to have unforeseen consequences. It'll get fixed using a formal process intended to ensure that more unforeseen consequences don't follow from a breaking change. This sort of thing happens all the time in this industry. Its not a conspiracy.
- ocdtrekkie 10y agoAnd this sort of stuff is definitely going to come up as Microsoft open sources things. I half think Microsoft would open source Windows today if they weren't terrified to show some of the stuff that undoubtedly lies beneath the covers.
- dTal 10y agoEmbarrasment would be the least of their troubles if they did that; for a start, Windows would instantly be community forked, and the fork would be instantly superior by virtue of having all the annoying stuff removed.
- traverseda 10y agoIf you're referring to my post, I don't think "conspiracy" is the right word. The "extend" part of "embrace, extend, extinguish" is just due to them having a somewhat insular culture that doesn't make use of upstream. You can be an entirely good person and do "embrace, extend". You're probably not the one making the decisions to extinguish.
- andyjohnson0 10y agoI only see one post by you on this topic, and thats the one I'm replying to. So no, I wasn't referring to you.
- yarrel 10y agoIt's not a conspiracy, no. It is harm from a historically bad actor. So it's not accepted with enthusiastic gratitude. And there's no reason why it should be.
- qwertyuiop924 10y ago...And I'd say that this displays a problem with the PowerShell design more than anything else. No, not that the curl and wget aliases exist: it made sense at the time, and no longer does, that's fine. The problem is that PS, unlike every other shell out there, handles structured data, which means it necessarily has to live in its own little world, with its own commandset, because even if it uses external commands, they're not going to be expecting structured data, because that's not how external commands work. So, by necessity, PowerShell is semi-monolithic, and doesn't integrate well with the rest of the system on UNIX, and integrates poorly with regular CLI apps on Windows. This is an unavoidable problem with what PowerShell is trying to do. It doesn't make PS bad, but it causes problems.
- lottin 10y agoExactly right. It's so funny when people cite one of Powershell's selling points as the fact that it's "extensible", meaning that you have to write programs specifically designed to be compatible with it.
- qwertyuiop924 10y agoWell, it CAN call out to unix commands, but it has poor text manipulation capabilities...
- jodrellblank 10y agoa) You don't, it can read text through stdin from any utility which outputs text. b) Other shell utilities aren't magically compatible with each other, they have to be "specifically designed" to output representations of information in compatible text forms. Which is an ad-hoc thing, hence the existance of parameters like -0 makes the output null terminated instead of newline terminated, for compatibility with tools x,y,z.
- jdmichal 10y agoYour comment ignores the major integration that PowerShell does provide: .NET. PowerShell can invoke any .NET code and work with the objects returned therefrom. Yes, it has terrible integration with text-based tools, because it's not a text-based shell. It has great integration with the .NET object-based environment, because it's a .NET object-based shell. (This is also completely ignoring the fact that you can still call any executable; you'll just receive a bunch of strings back. The only failing here is that PowerShell doesn't have the developed string-manipulation tools like sed, awk, etc. because working with text is typically unnecessary.)
- mcguire 10y agoHas anyone looked at the big list o' Powershell aliases? This is from the section containing wget and curl: ... // Porting note: #if !UNIX is used to disable alises for cmdlets which conflict with Linux / OS X #if !UNIX // ac is a native command on OS X new SessionStateAliasEntry("ac", "Add-Content", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), ... new SessionStateAliasEntry("cpp", "Copy-ItemProperty", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), new SessionStateAliasEntry("diff", "Compare-Object", "", ScopedItemOptions.ReadOnly | ScopedItemOptions.AllScope), ...
- MandieD 10y agoIt's great that Microsoft has made PowerShell available to anyone who wants to do as they like with it and even took the trouble of packing it up for Linux and macOS, but for release, they have to care about their paying customers first, which includes some Windows admins who ignored 10 years of advice to never use aliases in a script. I'm a Skype for Business/Exchange admin who has generally followed that advice, but even I tend to use "select" instead of "Select-Object" in scripts. This sort of thing is part of why open sourcing stuff that was developed closed and commercial isn't just a matter of tossing it up on GitHub and dropping a note here.
- mitm2mitm 10y agoAm I crazy or is Microsoft announcing new open source or dev friendly stuff everytime there's a PR bomb here on HN? 18/08/2016 https://news.ycombinator.com/item?id=12305598 https://news.ycombinator.com/item?id=12305598 With Windows 10, Microsoft Disregards User Choice and Privacy (eff.org) A day later they announce Power Shell is open source. I remember a few months ago they blasted HN's frontpage with news after a few discussions about telemetry and EEE (first wave of Windows 10/UWP showing its true colors). I don't care enough to do a reddit-esque investigation on HN stories. I just find it funny, that's all.
- unfunco 10y agoIf that's what they're trying to do, then they're doing it badly.
- frik 10y agoYou are definitely not crazy nor alone with watching these PR tactics. I dislike that so many MSFT employees/puppets/bots/fanboys frequent HN since Build conference 2015. I would prefer the HN of pre-Spring-2015 with news about venture capitalists, startups and software that matters to startups - and not corporate PR about software that doesn't make sense for startups. See how MySpace lost, look what software stack they used and how it burned through cash because of very expensive license fees, compare it to Facebook. Everyone who got burned by the Seattle guys once usually learn and avoid getting burned again.
- whoopdedo 10y agoDevil's advocate: If you're using PowerShell on Linux you probably mean to remain compatible with a Windows workflow. PS uses other unix aliases such as ls and cat. But these all have different semantics than their namesakes. So if PS on Linux deferred to the native tools it would break compatibility with PS on Windows where those tools aren't typically available. If PS wants to remain true to its own goal of being a unified toolchain for cross-platform development, it should stick to its own implementations even if it perturbs some people who are primarily *nix developers. Because developers not working with Windows are not the primary audience of PS. Consider that PS also aliases DOS commands such as DIR but is not compatible with the COMMAND.COM commands.
- anonbanker 10y agoOne should look through this user's history of posts. A vehement anti-free-software zealot, to the point of repeating the incorrect "ESR is a bigot" character assassination meme in unrelated threads. HN used to be about remembering usernames because you trusted their opinions. Nowadays, one has to remember usernames in order to filter-out noise. Lobste.rs has the old vibe now.
- qwertyuiop924 10y agoWait, so now you're attacking me? The ESR post was entirely justified given the context. And I'm not an anti FS zealot by any stretch. Also, ESR actually is a bigot. I mean, seriously, have you READ his blog? In addition, I still do remember a lot of usernames because I trust them. and in this case, I remember site names because I don't. And I'll remember your name, because it's one that I'll take less seriously from now on.
- anonbanker 10y agoI read his blog, and disagree. Some of the posts (racism is just a byproduct of the uncanny valley effect, for instance) actively disprove your statements. Either way, your post history proves me correct, and has for a while now.
- qwertyuiop924 10y agoI have brought up ESR only when it makes sense. If you looked at the parents, you'd know that. I am sometimes skeptical of RMS and his organization. That doesn't make me a bigot. And I'm looking at my post history right now. Also, that post doesn't really disprove my claim. And yes, I read it.
- sctb 10y agoWe detached this subthread from https://news.ycombinator.com/item?id=12320681 https://news.ycombinator.com/item?id=12320681 and marked it off-topic.
- pweissbrod 10y agoI wonder how many venomous comments in the PR were authored by people even remotely affected by the issue. I wager the answer is 0.
- krupan 10y agoThere is so much weight of history for Microsoft to overcome if they want to now be accepted and trusted by the open source community. I'm willing to believe that at least parts of the company are sincere and serious about achieving that, but they need to have a thick skin and be understanding when people don't immediately trust them right off the bat. Many long years of name calling and Embrace and Extend (which this particular issue feels a lot like) are going to take some time, patience, and long suffering on their part to counteract.
- senthilnayagam 10y agoDear Microsoft bundle curl and wget in the next patch / major release. Your Historical blunder can be forgiven and you can make new friends in open source
- rootlocus 10y agoOne of the arguments I saw from the Microsoft guys was that it's consistent with other "aliases" PowerShell has (like ps and ls). Reminds me of a demotivational poster we have at the office: https://www.google.ro/search?q=demotivational+poster+consistency&biw=1920&bih=995&tbm=isch&imgil=wlsu-mX1EFKYBM%253A%253BODUUUUR5Vh0_AM%253Bhttp%25253A%25252F%25252Fdespair.com%25252Fproducts%25252Fconsistency&source=iu&pf=m&fir=wlsu-mX1EFKYBM%253A%252CODUUUUR5Vh0_AM%252C_&usg=__L3-zFKPTsX5ICIEwWgnAO83bh2g%3D&ved=0ahUKEwjohNvL_s3OAhWKvBoKHZ6cAwcQyjcIJw&ei=0D-3V-jcDIr5ap65jjg#imgrc=wlsu-mX1EFKYBM%3A https://www.google.ro/search?q=demotivational+poster+consist... It reads: "Consistency: Only a virtue if you're not a screwup".
- tps5 10y agoThis is funny. I work on linux or mac os and a couple months ago I was trying to show an intern on windows how to use curl to make HTTP requests from the command line. Having no PS experience, I opened up PS and tried curl, saw that it was a known command but couldn't get it to work as expected since it didn't behave like curl usually does. Was very confusing. This should definitely get fixed.
- frik 10y ago429 points by laurent123456 4 hours ago | 289 comments And already pushed off the frontpage, yet stories with 16 votes are now on the frontpage.
- spdustin 10y agoI'll leave the MS politics out of my comment, and just summarize my suggestion [0] to handle this sort of thing. A module that has exported module members allowing you to opt-in to future breaking changes now could be added to PowerShell, similar to how Python has from future import [whatever]. So you could remove curl and wget aliases by adding Import-Module Future.RemoveAliases.Net.Http to your profile, or even opt-in to all future breaking changes by adding Import-Module Future to your profile. I wonder what Daniel would think of that idea. [0]: https://github.com/PowerShell/PowerShell/pull/1901#issuecomment-241100571 https://github.com/PowerShell/PowerShell/pull/1901#issuecomm...
- Gaelan 10y agoI think that *nix commands can be split into roughly two groups: ones that feel like generic "actions" and have multiple implementations (ls, cd, cat), and ones that refer to specific pieces of software (curl, emacs). The first category should be aliased to the PS equivalents, while the second should be left as-is. With commands like ls, I'd prefer to have my muscle memory get me the first-class Powershell experience (which means a structured list of files, not a string containing ls's output) instead of attempting to act exactly like ls acts in bash. If I didn't want to use Powershell's features (which /bin/ls does not support) I wouldn't use Powershell.
- ilaksh 10y agoPowerShell is really cool but its not a traditional shell at all. Totally different model. Also, Windows is not Linux. Stating the obvious but people seem to be doing a mashup without quite noticing the level of difference. Its not an open source organization. If it was, they would have the discussion there rather than just closing it and talking about an RFC. I think they should add an install option rather than nust defaulting to those aliases. MS does need to continue making money. No matter how much people pretend otherwise, that means they have a conflict of interest with open source and Linux. And the web platform (still). And with so many billions at stake, yes their actions reflect this conflict.