Or any other alternate shells that aren’t bash?

  • golden_zealot@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    18 hours ago

    I’ve used powershell in previous jobs and if you learn it really well I cannot deny it is super powerful.

    For a college project, a friend of mine somehow made a hexadecimal file dumper with it, with formatting and everything (think like what you would see in wireshark) in one, reasonably long, line of powershell.

    However I’m just not a big fan of it personally for syntactical reasons (even with the syntax being super logical) and much prefer bash, or other unix-like native shells. I’ve been thinking about taking zsh for a spin recently to see what it’s like.

  • the_weez@midwest.social
    link
    fedilink
    arrow-up
    4
    ·
    1 day ago

    Only when I’m doing MS shit for work. Otherwise I find it kind of a pain. I get that some of it’s ideas are nice, but functionally it doesn’t actually do anything for me on unixy systems that bash doesn’t so I don’t. I’m not going to install it on all my servers so using it for scripting doesn’t make sense and I do more Linux admin than MS.

  • lordnikon@lemmy.world
    link
    fedilink
    English
    arrow-up
    41
    arrow-down
    1
    ·
    2 days ago

    The idea of someone using powershell when you are on Linux is a form of self harm and you need to reach out as its clearly a cry for help.

  • Mactan@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    1 day ago

    only for extraordinarily cursed situations where games need it in wine/proton

  • chrash0@lemmy.world
    link
    fedilink
    arrow-up
    19
    arrow-down
    1
    ·
    2 days ago

    i’m a big nushell fan.

    i was once sitting where you are. when PowerShell was released on Linux i thought about switching and read the manual. i really liked some of the philosophy:

    • descriptive names for commands. cat and ls have canonical short names to save disk space on the systems they were created for. this is no longer a constraint and aliasing a longer command name is better than “git gud n00b” when it comes to discoverability.
    • structured data. “everything is a string” is great when programs play nice. it breaks apart when programs prefer human readable output or worse don’t provide structured output, like format=json or whatever.
    • modern control flow semantics. yes, pipes are great, let’s keep those, but why do i have to rtfm every time i want to bang out a simple script with an if-else control flow?

    i looked around at a few solutions. xonsh uses Python. eshell is integrated into emacs and uses Elisp. i briefly tried to hack something together using Kotlin Script. and yeah, i tried PowerShell.

    i settled on nushell not just because it fulfilled the above requirements, but also:

    • simple data types. string, number, list, record, and table are about the only types you deal with.
    • wide support for structured data. JSON, YAML, TOML, CSV, etc have parsers built in. jq and other such tools are made irrelevant because you just load it into nushell query with a unified DSL using common syntax like select and where.

    honestly, these are the killer features. there are so many more. context aware autocomplete, modules and overlays, super easy custom completions, extension functions (one of my favorites is git remote open), cross platform (if you’re forced to use Windows), plugins, and i can contribute since i do Rust development for work.

    give PowerShell a shot, but i think nushell is the happy medium

    • flying_sheep@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      1 day ago

      Finally! Nushell is awesome. The infrequent deprecations are a bit annoying, but I prefer them to having a bad program go 1.0

    • Euphoma@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      12
      arrow-down
      1
      ·
      2 days ago

      Why not? It seems like a well supported shell on windows that isn’t terrible.

    • jollyrogue@lemmy.ml
      link
      fedilink
      arrow-up
      2
      ·
      2 days ago

      Because I have to admin Windows boxes and M365. There are PS modules for lots of different MS things.

        • JackbyDev@programming.dev
          link
          fedilink
          English
          arrow-up
          2
          arrow-down
          1
          ·
          2 days ago

          The practical purpose of asking is to get a feel for how many people use it.

          Less tongue in cheek though, it sounds like you have the same questions as OP. If you’re curious what might be the practical purpose, why not ask people who use it why they do instead of berating OP for asking if anyone uses it?

          • just_another_person@lemmy.world
            link
            fedilink
            arrow-up
            1
            arrow-down
            1
            ·
            2 days ago

            Well by that logic, it’s a way for Windows users to not learn the native tooling available, but not skip any steps. It doesn’t make any sense.

            Learning Powershell in a Linux environment is going to just absolutely be a crutch and fuck up your ability to interact with other Linux systems that don’t share your particular environment.

            • JackbyDev@programming.dev
              link
              fedilink
              English
              arrow-up
              1
              arrow-down
              1
              ·
              2 days ago

              As someone who used bash on Windows through MSYS, I don’t see the issue. It was different, not inferior, to cmd and PowerShell. If someone wants to use PowerShell on Linux why be such a condescending jerk about it? Sometimes people just wanna try things for the fun of trying new things.

    • signofzeta@lemmygrad.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      Because I never learned Bash scripting, for whatever reason, and WSL wasn’t yet available to load on my work PC at the time.

  • Heavybell@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 day ago

    I use it for some things. It’s good for file batch processing, for example. I could probably do those things in python but I use C# and powershell at work so I know .net better.

  • Doorknob@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 day ago

    I tried to use it for admin in a Windows environment, but half the modules I needed wouldn’t work in Linux which made it pretty much useless.

  • Tapionpoika@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    2 days ago

    It is not always Bash. Zsh comes as a default with some Arch based distros like Manjaro (xfce) and Garuda, plus Kali of course. But what is the point to use PowerShell in Linux? … Azure, Exchange or Windows servers or something else I don’t get?

  • eldavi@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    i ws forced to do it recently and noticed that they enforce usage of black terminal, like it is in the command prompt in windows.

    it was a pain in the ass to keep switch colors just to touch that one powershell module and my first priority to replacing with with a python equivalent. they still think that the powershell module is being used, but it’s no longer capable of working in this environment and they’re going to have to spend $$$ to make it useable because i forsee LOT of difficulty and delays in bringing it up to spec.

  • Mugita Sokio@discuss.online
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    My producer and I personally use Bash. We tried zsh, but that didn’t treat us very well. Fish is actually pretty nice, though.