• Pika@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    2 days ago

    This is a good way of putting it. It’s essentially ZSH with Autosuggest/complete and a theming agent. At least visual-wise.

    When you get into the scripting and the hot keys aspect of it, they reinvent the wheel and everything is different., Like for example ,!! and other bangs(I think that’s the right word?) like that are not valid on fish, And everything to do with variables is different from adding to your path to setting variables to creating functions. Also checking your error code is going to be different as well as it doesn’t follow the $x style inputs and doesn’t support IFS and globbing works differently.

    TLDR; fish is nice, but If you use it unless you want to relearn an entire type of language, keep your scripts on bash or zsh

    or if you wanna see the bigger differences fish has a dedicated bash transition page

    • Digit@lemmy.wtf
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 day ago

      I never managed to learn bash’s ways in my first decade of using it, learning fish a decade ago was easy by comparison. So much more human readable and sensible and consistent. Even though fish is the friendly interactive shell, I now use it for all my scripting too.

      • Pika@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 day ago

        That was the exact opposite with fish. I had already gotten fairly well first with bash by the time I started using it, and the way fish did it was just super counterintuitive to me.

        I couldn’t get into the overall design of how it looked and I disliked how command substitution and the built in’s worked, Combined with the fact that it’s a lesser used shell, so there’s less information available on it. I just couldn’t do it.

        You brought up a point though. That makes me ask. You must not have to share your scripts with anyone then, right? Fish has a very small user base in comparison to ZSH and Bash and when I make a script that’s more advanced I tend to want to share it with my friends and having them install a whole new shell just to run a script is just not helpful to me. ZSH is close enough to bash in compatibility that, generally speaking, if I want to share it, I can use zsh And then convert the minor discrepancies. Where with fish I have to redo the entire script.

        • Digit@lemmy.wtf
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          19 hours ago

          I don’t know why small user base is considered as meaning I must not have to share my scripts. Is it like an argumentum populum thing? [“If you build it they will come.” ;D]

          [I suppose It’s true in a strict interpretation of those words… I don’t have to.]

          I think I have several on my git repos. [… I have even written a text editor in fish.]

          Free to use for anyone who wants to.

          Also, if user base size is a concern, Fish’s user base is growing faster than Bash or ZSH.

          Installing another shell seems a trivial matter to run something.

          I install far bigger languages for far less all the time.

          And conversion [if for some edge case reason you really need to ~ I know not why though] is generally trivial these days… just ask an LLM, if conversion scripts are lacking.

          As for the less information about it… the online help’s really rather thorough and accessible.

          I don’t know that quantity over quality would help. It didn’t for me and bash.

          Unless I missed something, it seems to me that all that remains, is

          I disliked

          And that’s of course utterly fine. Free software’s defining point zero, the freedom to use software, includes the freedom to not use. Good to have multiple options to further facilitate that first freedom, catering to more variety of tastes.