Using PowerShell over SSH, Twenty Years Later

(mattmichie.com)

25 points | by influx a day ago ago

15 comments

  • sn0n a day ago ago

    The most mobile friendly site ever,… said no one.

  • somat a day ago ago

    The way microsoft just shipped openssh is one of the saner things they have done. I am still vaguely shocked they managed to resist the temptation to MSify it.

    • moqmar a day ago ago

      Fun fact: They also ship curl.exe, which is different from curl in PowerShell, as the latter is an alias to Invoke-WebRequest. That's one of the insanest decisions they could make during one of the sanest ones.

      • pjmlp a day ago ago

        Unfortunately the recent decision to adopt coreutils is similarly bad.

        Lots of conflicting commands between UNIX, Powershell and classical cmd.

        Thankfully it is still optional, not something shipping in the box.

        • 7bit 19 hours ago ago

          It is bad because some commands that are in coreutils are conflicting with cmd commands or Windows binaries?

          The only thing bad is that take. It's an optional package. It doesn't overwrite any cmd commands or Windows binaries be default. So the user can decide what to install and what to use. It gives full flexibility.

          If you say that's a bad choice, I think you're more commenting on your inability to work with these tools, than the tools itself.

          • pjmlp 19 hours ago ago

            It has conflicts all over the place, and requires being skilled across UNIX, Powershell and cmd, to fine tune the PATH and Windows Terminal sessions in order to get the right executables, depending on what one is doing.

            As for my skills, I have been coding since 1986, and even though Windows is my main platform, I have used more UNIX flavours in all those years than most HN commmenters.

      • rackp a day ago ago

        [flagged]

  • adithyassekhar 16 hours ago ago

    I’m glad the default ssh shell is cmd. I know it like the back of my hand. I am much better at remembering commands and flags (rd, -h) than phrases that feels like regular conversation (Remove-Item?).

    Maybe I’m old, I like to keep “software talk” for software and “people talk” for people.

    • wtallis 14 hours ago ago

      PowerShell has always struck me as being fine for scripting (especially since the OS ships with an editor with autocomplete), but absolutely insane for everyday interactive use, especially given how many places Microsoft applied their usual tactic of making their clone of an existing thing arbitrarily different. The design was clearly heavily informed by Unix shells, but it's like they were operating under a mandate to apply the principle of maximum surprise. Stuff like the default tab completion behavior very obviously interacts badly with the extreme verbosity.

      • indrora 14 hours ago ago

        The most useful thing I did when I started working with powershell as my daily shell was to _remove half the default aliases_

        once I broke my muscle-memory by trying to treat it as a historic shell, it became far more usable. Yes, get-childitem is a little weird to remember, but once you realize what it's doing isn't what `ls` does, you get a far better grasp on the environment.

        Write some cmdlets. You'll discover how useful having a sane, object-oriented shell is.

        • wtallis 3 hours ago ago

          > Yes, get-childitem is a little weird to remember,

          That's not the problem. The problem is that it's way too much typing, and with the default tab completion behavior it's often way too much backspacing if I didn't get what I want. A good command-line shell designed for interactive use should be terse enough that it's clearly faster than using a GUI. And the OS should ship with such a shell out of the box; building your own on top of a weird scripting language is silly and not at all the same thing as the OS having a reasonable shell built-in. (Most of the value in PowerShell comes from having it installed by default on all Windows systems, and it's sad that Microsoft decided to just freeze it at 5.1.)

    • bitwize 16 hours ago ago

      I hate to break it to ya, but there's been kind of a change in the way software gets built especially in the past year or so...

      • adithyassekhar 14 hours ago ago

        That is true. Though i still use some kind of pseudo code to talk to claude, its just easier for me to explain a function that way than describing it.