• gomp@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    Never used powershell (thanks heavens, I’ve not touched windows since windows 7). Is it similar to nushell?

    • Skull giver@popplesburger.hilciferous.nl
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      Yes, that looks quite similar, although the full version of Powershell also has access to almost the entire .NET framework, so it’s an interesting mix between programming language and shell rather than just a shell. This also allows for things like hashmaps and queues rather than plain old arrays, for instance. NuShell does the data exchange well, but doesn’t seem to go all-in on OOP scripting like Powershell does.

      Some tools such as WinSCP expose quite a large set of features through this mechanism, which give you a lot more control than what most commands can handle.

      It’s like C# but variables are kind of $phpStyle and methods are Capitalised-Kebab-Case for some reason. I find the syntax very easy to read, but rather annoying to write for long, complex commands. Luckily, you can leverage the many IDEs to make the process less painful (or chatgpt I suppose).