4 ms·
It'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 b
by hota_mazi 10y ago
It'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.
- yellowapple 10y agoThis actually works reasonably well in Perl, where you can, for example, stick "use 5.22.2;" in a script and thus enable all the features of that version (and the versions before it) while keeping the features of newer versions disabled, thus ensuring backward compatibility.