• boonhet@sopuli.xyz
      link
      fedilink
      arrow-up
      4
      ·
      2 hours ago

      Prints out what shell you’re using. Bash is default for most Linux distros. MacOS switched from bash to zsh as their default. Zsh is hella customizable, by default it functions more or less like bash.

      Fish is cool, has neat quality of life features out of the box, but can also break scripts sometimes.

  • RoyaltyInTraining@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    4 hours ago

    Fish was kinda cool when I tried it, but I don’t really care about the benefits that much. I love Zsh’s effortless customization with Oh My Zsh and the POSIX compatibility.

  • mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    22
    ·
    13 hours ago

    Default zsh is just bash, you need to add all the fancy plugins to get it to do cool stuff

    fish is for people who don’t want to spend the time setting it all up and to just get a shell that has most of the QoL fetaures builtin.

  • muusemuuse@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    8
    ·
    11 hours ago

    I literally do not notice any difference. If the folders and such get the pretty colors and tab works, I could give a damn.

    • Tangent5280@lemmy.world
      link
      fedilink
      arrow-up
      9
      ·
      8 hours ago

      Brave stand, I will stand side by side with you until the first signs of mild resistance or mockery from the world!

      • ulterno@programming.dev
        link
        fedilink
        English
        arrow-up
        1
        ·
        3 hours ago

        Well guess what?

        #include <string.h>
        #include <iostream>
        
        int main (int argc, char *argv[])
        {
        	const int which = strcmp ("zsh", "bash");
        	std::cout << which << std::endl;
        	return 0;
        }
        

        Output
        1

    • Tangent5280@lemmy.world
      link
      fedilink
      arrow-up
      8
      ·
      8 hours ago

      Search for whatever passes for a terminal in microslop machine

      Top result is Terminal from 2018

      As far as I can tell it is some kind of action thriller movie?

      0/10 garbage experience

      Movie was terrible also

    • Fisch@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      82
      ·
      24 hours ago

      Currently using zsh but I installed fish yesterday to try it out because I’m thinking of switching. All the zsh plugins I have are basically just replicating what fish has by default anyway and fish might do it better.

    • flandish@lemmy.world
      link
      fedilink
      arrow-up
      22
      ·
      1 day ago

      what’s fish got? I’m liking zsh here but am always open to a distraction instead of getting work done. :)

      • null@piefed.nullspace.lol
        link
        fedilink
        English
        arrow-up
        35
        ·
        24 hours ago

        Lovely OOTB defaults. I basically change nothing except the theme.

        Autocomplete, git context, etc. The QOL stuff you’d expect.

          • OhNoMoreLemmy@lemmy.ml
            link
            fedilink
            arrow-up
            29
            ·
            24 hours ago

            The main differentiator of fish over everything else is it prioritizes intuitive behavior over backwards compatibility.

            Zsh is to bash as c++ is to c. Most bash scripts and habits will work in zsh, but zsh is just more convenient and has more options. Fish is intentionally different.

            Do I wish fish had existed instead of bash so we had a nicer terminal experience? On the whole, yes. But I also couldn’t be bothered to learn another shell where most of the instructions online won’t be able to help you, and I ended up sticking with zsh.

          • Laser@feddit.org
            link
            fedilink
            arrow-up
            13
            arrow-down
            2
            ·
            24 hours ago

            Be aware that fish isn’t a POSIX-compatible shell enough, so you have to adjust syntax.

            • rtxn@lemmy.worldM
              link
              fedilink
              arrow-up
              19
              ·
              edit-2
              23 hours ago

              That isn’t incorrect, but it’s not as important as people make it out to be. Linux isn’t certified as POSIX-conformant either.

              People are way too stuck on POSIX regarding Fish specifically, but in shell scripting, POSIX compliance boils down to “can it run a pure sh script”. Bash is compliant. Zsh is partially compliant and needs to set an option to emulate sh. Fish uses a different syntax and is not compliant; if that is a problem, don’t execute sh scripts in Fish.

              POSIX compliance for shell scripts was important in the 80s and 90s when the #! directive wasn’t as commonly implemented and every script might be executed by the user’s $SHELL instead. That is no longer the case as virtually every Unix-like system’s program loader supports #!.

              • Black616Angel@discuss.tchncs.de
                link
                fedilink
                arrow-up
                3
                ·
                22 hours ago

                I use fish, but sometimes it acts weird. And lots of “just copy and past this command” kind of online solutions I have to put into bash.

                My main irk is when I want to forward a ‘*’ to a program but have to escape it.

              • Laser@feddit.org
                link
                fedilink
                arrow-up
                3
                ·
                edit-2
                21 hours ago

                It’s a cool shell, I use it as a daily driver (though I’m keeping a close eye on elvish which syntactically is even further away from classic shell), but the comments read like fish is basically zsh. And while zsh is pretty close to bash, fish isn’t.

          • Pika@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            5
            ·
            edit-2
            22 hours 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
              ·
              51 minutes 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.

          • null@piefed.nullspace.lol
            link
            fedilink
            English
            arrow-up
            2
            ·
            24 hours ago

            Yup, very similar! And quite customizable as well if you want to. But the focus is on having, by default, a friendly interactive shell.

            I like that I can spin up a VM, install fish, chsh and I’m all set.

    • prole@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      5
      ·
      23 hours ago

      Fish is great if you can’t remember a specific command, or don’t want to type out long filenames/locations, but I dunno if I’d use it as the default.

      I just type “fish” in the terminal if I ever run into a situation where I might get some use from it.

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

        in my ~/.bashrc

        # if interactive, launch fish
        [[ $- != *i* ]] && return || fish
        

        and

        alias f='fish'
        

        So fish is my default, and if I ever need bash, it’s already there underneath, just a Ctrl-d keybind away to fall back on, and if I want to get back into fish, it’s just a f & RETURN away.

        Seems better to have all the convenience of fish up front. All the completion magic. I so rarely have to type much at all.

        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          3
          ·
          18 hours ago

          I have that occasionally when I want to copy a complex bash command from somewhere. But yeah, I can then just run bash, run the command in there and then exit back out of there.

            • Ephera@lemmy.ml
              link
              fedilink
              English
              arrow-up
              2
              ·
              14 hours ago

              I’m guessing, you mean this then: https://github.com/edc/bass

              But well, I was rather thinking of when it’s using Bash-scripting-syntax to combine multiple commands.
              Like, maybe there’s a for-loop in there. You just can’t paste that directly into Fish and have it work. Granted, you should probably put that into a script file, even if you’re using Bash, but yeah, just temporarily launching bash is also an option.

    • inzen@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      17 hours ago

      I jumped from bash to fish because cachy os has it as default. I kinda don’t like it, it’s a little too fancy, but it’s not bad enough for me to bother switching the default to bash. So I’m using it. Still not quite liking it but maybe it’s growing on me.

  • yardratianSoma@lemmy.ca
    link
    fedilink
    arrow-up
    25
    arrow-down
    1
    ·
    18 hours ago

    I have never really ever used bash and thought, "Man, I wish my shell was better . . . ". Using ctrl+r to recall past commands, using sudo !! to fix missing permissions and writing small bash scripts all work very well.

    That being said, if you use anything else, and you like it, I’m happy for you, but I do wonder, what leads people to other shells? What problems do they have with bash?

    • Digit@lemmy.wtf
      link
      fedilink
      English
      arrow-up
      2
      ·
      43 minutes ago

      Try fish for a week, use the online help to familiarise with the completion stuff… see if you still find bash adequate.

    • phaedrus@piefed.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      6 hours ago

      I script everything in bash, but for everyday use fish just has some modern QoL things that make it easier to get around. For me, specifically, it’s the way you can recall commands by seeing a ghost version of your history, as you type. You can even scroll through a filtered history if you’re part-way through typing some long command that matches what you have typed.

      Another neat thing, it does it’s best to predict what I want to type and remembers common locations, showing them as ghost text as well.

    • Ephera@lemmy.ml
      link
      fedilink
      English
      arrow-up
      16
      ·
      edit-2
      14 hours ago

      To me, it genuinely makes a huge difference that I don’t have to manually press Ctrl+R for history search. Because 9 times out of 10, I accept a history suggestion from Fish where I did not think about whether it would be in my history.

      This includes really mundane commands, like cd some/deeply/nested/path/. You would not believe, how often I want to cd into the same directory.
      But I’ve also had it where I started typing a complicated docker run command and Fish suggests the exact command I want to write, because apparently I already ran that exact command months ago and simply forgot.

      • Digit@lemmy.wtf
        link
        fedilink
        English
        arrow-up
        2
        ·
        27 minutes ago

        Yep, and fish has even more ways to expedite frequent used commands and locations, but because the completion stuff’s so good, it’s easy to never bother setting up abbreviations and keybinds and so on. So many things are often just a couple key presses away, by default, after using it for a while.

      • astro@leminal.space
        link
        fedilink
        arrow-up
        12
        ·
        15 hours ago

        I used bash for 20 years and, while I obviously knew that there were alternatives, it never seemed necessary to switch. Tried fish on a whim a few months ago and I will never go back.

        • Ben@feddit.dk
          link
          fedilink
          arrow-up
          1
          ·
          2 hours ago

          Do you know if fish can input arguments from prevous commands like ESC + . does in bash?

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

            Do you know if fish can input arguments from prevous commands like ESC + . does in bash?

            Like Alt-.? (/ Alt - > ).

            Easier in reach, and can cycle through.

            I’ve not got that in my muscle memory yet… so rarely used… had to look that up. Handy. Should use more.

    • baguettefish@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      5
      ·
      18 hours ago

      i use bash but i also use atuin which makes shell history so much neater. that’s about the only convenience i need in a terminal shell.

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

      I hear ZSH can be made as nice as fish (or near enough (~?)), but I’ve just never bothered since fish is nice straight out of the box.

  • juipeltje@lemmy.world
    link
    fedilink
    arrow-up
    13
    ·
    20 hours ago

    I never tried anything other than bash tbh. Not sure if i should. I never really looked into what i might be missing out on with a different shell. Bash just works so i never felt like messing around with it.

      • juipeltje@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 hours ago

        Hmm, i didn’t know ubuntu was using a different shell. I’ve used it a few times in a vm. Other than that i installed it on my laptop once like 15 years ago lol.

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

        So true.

        Save the RSI spoons for the real work. Don’t waste them on the shell. Get more done, with less pain, less effort, faster.

  • IrateAnteater@sh.itjust.works
    link
    fedilink
    arrow-up
    30
    ·
    24 hours ago

    I switched from bash to zsh a while ago, mostly just for shits and giggles. I really can’t see any reason to form a strong opinion on it one way or the other.

    • jollyrogue@lemmy.ml
      link
      fedilink
      arrow-up
      1
      ·
      11 hours ago

      Zsh is but more for interactivity. The extended file globbing, extended auto completion, and loadable modules are the main reasons I like it. The features really shine when used with a configuration framework like ohmyzsh.

      Supposedly, Zsh has a more comprehensive shell scripting syntax, but that’s not a plus since I don’t want to write shell scripts.

    • grue@lemmy.world
      link
      fedilink
      arrow-up
      41
      arrow-down
      10
      ·
      23 hours ago

      Bash is copyleft (GPLv3). Zsh is permissively-licensed.

      Apple, for instance, switched from bash to zsh when the GPL version upgraded because they wanted to withhold those rights from their users.

      Zsh should be considered harmful as a tool of corporate encroachment and subjugation of Free Software.

    • Pika@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      4
      ·
      22 hours ago

      I went from bash to fish to zsh. I can see why people would like having fish as a shell. but I hated scripting on it and if I’m going to be triggering a different shell for scripts anyway, I might as well skip the middleman, not re-invent the wheel and just use zsh with plug-ins that way I only have two shells installed instead of three. Adding the auto-complete plugin and a theme plugin for zsh gives most of fishes base functionality and design while making it so I don’t nerd to worry about compatibility.

      Maybe someday when I’m less code oriented, I will re-look at fish, but I don’t see it happening in the foreseeable future.

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

        Heh. I script nearly everything in fish now, because it’s way more expedient and readable. [At first I didn’t, just thought its advantages are interactive. Better scripting snuck up on me.]

        Wouldnt ZSH be the wasted middle in your analogy?

        Fish wheel already invented, no contrived middle.