• Lorem Ipsum dolor sit amet@lemmy.world
      link
      fedilink
      arrow-up
      13
      ·
      5 hours ago

      I would really recommend you try fish.

      It has a lot of nice autocomplete features and handles functions much better than bash. It has a very sensible autoconfig so you can just install and try it.

      Zsh can be configured in quite a lot of ways. It’s default config is quite similar to bash.

      • ErenOnizuka@lemmy.dbzer0.com
        link
        fedilink
        arrow-up
        4
        ·
        5 hours ago

        What does it autocomplete? Filenames? Bash can do that too, right? I just hit the tab key and it’s written there.

        And with functions you mean in scripts? How does it handle functions better?

        • Lorem Ipsum dolor sit amet@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          3 hours ago

          Autocompletions in fish also take history into account, which saves you a lot of typing in the long run.

          Fish shell script is much more sensibly constructed than bash so it’s just much easier to write a script in fish.

          • voodooattack@lemmy.world
            link
            fedilink
            arrow-up
            1
            ·
            1 hour ago

            Fish was amazing when I first discovered it, but I found it had too many problems for me to effectively use it. Having to adapt existing bash/zsh scripts was a major problem for me.

            So I went the other way around and managed to get all of the Fish features I wanted working under zsh using atuin, starship, and other misc. oh-my-zsh plugins to fill the gaps.

            Best part: I used a git-controlled home-manager setup to do it so I can activate my entire environment on a fresh machine/server in minutes after I clone it.

    • TheTimeKnife@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      5 hours ago

      Features and default settings, but its really just about preference. They are all good at what they do.

      Also im only saying this because it confused me for so long, but shell and terminal are different parts of the same thing. Bash is your shell, its the backend that runs everything you type into your terminal. My computer for example uses my kitty terminal which communicates in bash. You can change both the shell and terminal. Zsh is another shell, so it would change the “shell language” you use to communicate with your terminal.

    • kartoffelsaft@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      5 hours ago

      There can be a ton of reasons, albeit I personally also just stick with default (for me zsh). In typical linux user fashion I also must tell you that bash and zsh are shells, not terminals.

      The two main reasons you’d choose a particular shell is because you prefer it’s configurability or syntax. Zsh has a bunch of features that you can enable and you can configure it to behave basically however you want, like adding spelling correction or multiline editing, but it’s defaults absolutely suck unless your distro comes with a sensible config. Fish, which another guy here’s raved about, goes in basically the opposite direction and is really nice to use out of the box (I haven’t used it though). I hear it’s technically not a valid /bin/sh substitute like zsh or bash because of syntactic differences, but that’d be a whole other rabbit hole if true.

      One other reason can be performance concerns because bash is pretty slow when treated as a programming language, but I’d argue you shouldn’t organize your workflow so that bash is a performance bottleneck.