• scrion@lemmy.world
    link
    fedilink
    English
    arrow-up
    156
    arrow-down
    1
    ·
    3 days ago

    The cherry on top is the warning about the PowerShell team cooking up their own version of a download command with an incompatible syntax, but still calling it curl.

    • The_Decryptor@aussie.zone
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 days ago

      They don’t do that anymore in new versions, but you still need to actually use the new version to get that behaviour. It’s a bit of a pain since the “fixed” version is in the MS store, the broken one is a base system component.

      It also hits the people who use the terminal the least, anybody who uses it regularly will just install the new shell at the same time they install the new terminal and always get the new clean behaviour.

    • Elvith Ma'for@feddit.org
      link
      fedilink
      English
      arrow-up
      40
      ·
      edit-2
      3 days ago

      Microsoft just set a system wide default alias in Powershell for Invoke-WebRequest called curl.

      While I get their reasoning for that (I mean, they also aliased e.g. ls and dir to Get-ChildItem which is the same, but way more powerful than the OG commands the aliases hint at), the problem is, that in all those cases the arguments don’t match. Something that plays in the favor of Powershell is that arguments are not case sensitive and do not need to be written in full, as long as they’re distinct - e.g. -Force may be abbreviated -f as long it’s the only argument starting with f. While dir or ls is somewhat likely to be called without arguments (or maybe -f) that’s definitely not the case for curl.

        • Elvith Ma'for@feddit.org
          link
          fedilink
          English
          arrow-up
          12
          ·
          2 days ago

          Yes. Somewhat. In Powershell dir is an alias for Get-ChildItem.

          While dir . or dir C:\test\ works as expected, you could also do this: dir HKLM:\HARDWARE -Recurse -Depth 5 which will list your registry from the local machine from the key HARDWARE recursively - but only to a depth of 5 levels.