you are viewing a single comment's thread
view the rest of the comments
[–] 37 points 2 years ago (6 children)

If powershell wasn't a Microsoft product I think it could easily outclass any shell currently available. The concept of command output typing is hand down one of the best features of any shell I've tried.

  • source
  • parent
  • hideshow 12 child comments
  • [–] 21 points 2 years ago (1 child)

    nushell is a thing, and basically has all the fun powershell features like a type system, but a more Unixy presentation. I've not used it, so don't know if it's actually any good, but it at least exists.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    Can you write bash with nushell?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 2 years ago* (1 child)

    No, it is its own scripting language.

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 2 years ago (1 child)

    Is nushell comparable to fish?

  • source
  • parent
  • hideshow 2 child comments
  • [–] 5 points 2 years ago

    Yes and no. Yes in that it's a different shell that is intended to be used instead of something like Bash, and isn't compatible with Bash scripts. However, unlike Fish and Zsh, it's also not compatible with plain POSIX sh, so you have to run plain shell scripts by calling into something else that is sh-compatible.

  • source
  • parent
  • [–] 12 points 2 years ago (2 children)

    Apples to oranges, powershell is windows exposing most of COM, WMI and .NET object models while improving on the previous options with CScript and VBscript, as those are older than .NET.

    Why are we comparing it with UNIX/Linux shells is beyond me.

  • source
  • parent
  • hideshow 4 child comments
  • [–] 8 points 2 years ago

    You say that like it's a bad thing. Having access to all those things by writing a few descriptive words and a great help system (looking at you, linux commands) is awesome.

  • source
  • parent
  • Because ms is positionning it (and indeed publishing it) as a rival to bash, zsh et al. You can use PS on Linux if you feel so inclined and take advantage of most of the day-to-day features. The .NET interfaces are nice but to me they're more a way for them not to add cmdlets for everything by going "its in .NET already".

  • source
  • parent
  • [–] 11 points 2 years ago* (1 child)

    How is it being a Microsoft product a bad thing? It's fully open source and available on both Linux and Windows;
    also nushell

  • source
  • parent
  • hideshow 2 child comments
  • [–] 9 points 2 years ago (1 child)

    Microsoft has literally invented EEE (Embrace, Extend, Extinguish).

  • source
  • parent
  • hideshow 2 child comments
  • [–] 1 point 2 years ago (3 children)

    I'm confused by this command output typing you're talking about, and I'm not sure if I found the correct thing. Are you talking about the Write-Host and Write-Output?

  • source
  • parent
  • hideshow 6 child comments
  • [–] 9 points 2 years ago

    I'd assume they mean that command return values can have types besides string. In classical shells, all data is stringy, so every command has to re-interpret everything. PowerShell can actually use data types.

  • source
  • parent
  • In powershell, commands may return types different from string and other commands may accept arguments that are not strings. For example, you can pass an array between commands where in bash you just have a string with \n separated values. You may also interact with more complex objects

    I once made a script for a monitoring software that takes its input as json, so I built a custom object that had all the data and then called .tojson on it and that was that.

  • source
  • parent