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

        Powershell may have a stupid syntax, but it’s actually pretty good if you look beyond that. Piping objects between scriptlets is so much better than the awk/grep workflows on Linux.

        I tried to use it as a base scripting language for a while but I just can’t get over the super verbose command line. Probably great for scripts, but not great in an interactive terminal.

        • gomp@lemmy.ml
          link
          fedilink
          arrow-up
          0
          ·
          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).