I just found out about fish shell a few moments ago. I switched Konsole on KDE to use it instead of bash and am impressed so far. Might install it on the Pihole eventually. Good stuff, just wanted to share. :)

  • Alphane Moon@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    4 days ago

    How does it compare to bash?

    I am a relatively casual Linux user (headless Pi-hole and grandma used to use Ubuntu for basic use cases) and have only ever used Bash, that too for relatively simple tasks.

    • LucidNightmare@lemmy.dbzer0.comOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 days ago

      I do not use bash for anything other than running what a casual Linux user would be running. I like it for the autocomplete functions, and the TAB feature to give you my own reasons! That’s all I need in my setup, so it works way better than bash. :)

    • Botzo@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      4 days ago

      If you ever copy paste commands you don’t understand (and aren’t prepared to take a detour down a rabbit hole to figure out why they didn’t work), stick with bash (or zsh).

      Fish isn’t “posix compliant” which can make some things work (or not) unexpectedly.

      Don’t get me wrong, it’s a great shell and there are many reasons people emulate its behaviors in other shells, but I can’t recommend it as a “newbie” or “casual user” choice.

      • Alphane Moon@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        arrow-down
        3
        ·
        4 days ago

        I most definitely copy and paste commands that I don’t understand. I even use LLMs to help write simple Bash scripts. :)

        I was just curious what the use cases are for this shell as I’ve only ever used Bash.

        • Botzo@lemmy.world
          link
          fedilink
          English
          arrow-up
          8
          ·
          edit-2
          4 days ago

          It’s a very user-friendly shell… except for the posix compliance.

          Everyone I know who (still) uses it daily accepts that they have to translate back and forth and still write scripts in bash (or sh).

          If you wanna give it a go, by all means. It’s just as easy to switch as to switch back. You can always drop into bash and try a command again too.

          • Victor@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            ·
            4 days ago

            I never have to write scripts in bash after having switched to fish. I just write all my scripts in fish. 🤷‍♂️

            • Ephera@lemmy.ml
              link
              fedilink
              English
              arrow-up
              5
              ·
              3 days ago

              It’s unfortunately not that easy when you’re using Linux at your job or want to be able to share your scripts with others…

              Like, Bash for scripting is quite cursed, but people will typically still prefer using it over learning a new language.

              • Victor@lemmy.world
                link
                fedilink
                English
                arrow-up
                3
                ·
                3 days ago

                I use Linux for my job but luckily I don’t have to share scripts with anyone. 😌

              • 123@programming.dev
                link
                fedilink
                English
                arrow-up
                1
                ·
                3 days ago

                Not to mention some environments don’t let you install anything other than what’s already on the box. Both sh and bash generally are available.

                • Ephera@lemmy.ml
                  link
                  fedilink
                  English
                  arrow-up
                  1
                  ·
                  3 days ago

                  Ah, good point. In many cases, you also don’t want to install an alternative shell, like if you’re dealing with lots of containers and would need to make Fish available in each one.

                  Although, I will say that more recent versions of Fish are available as a standalone executable, so you don’t have to install it in the traditional sense. You can probably transfer it together with your script file in most cases. That’s a relatively new/experimental feature of Fish, though, so no idea how well such a workflow goes in practice.

    • tyler@programming.dev
      link
      fedilink
      English
      arrow-up
      3
      ·
      4 days ago

      It’s vastly more user friendly than bash, though if you need to write a script and only know bash then you should drop back into bash.