So I’ve been using Linux now for a while, and am looking to migrate my dev environment to vim and spend more time in the command line. I’m fairly comfortable with bash but by no means an expert. I’ve used zsh with some minor customization but just recently learned about fish. I’d love to hear people’s opinions.

  • cybervoid@lemmy.world
    link
    fedilink
    English
    arrow-up
    13
    arrow-down
    1
    ·
    1 year ago

    I moved to the fish shell a while ago and I love it, everything I need works OOB. I don’t understand people complaining about the different sintax for scripts, this is a non issue, just use #!/bin/bash at the start of your script and it will use bash, or just execute directly with “bash script.sh”.

    • nickwitha_k (he/him)@lemmy.sdf.org
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      1 year ago

      I don’t understand people complaining about the different sintax for scripts, this is a non issue…

      I have a two major reasons:

      • Adding another shell syntax adds unnecessary cognitive load and context switching. If I were to use a non-POSIX shell, I’d have to remember another, highly domain-specific language, in addition to BASH/ZSH/SH and need to context switch when writing and debugging shell scripts. Instead, I can spend the mental energy on writing code, and learning new languages and tools.
      • Most remote *nix systems run BASH or another POSIX-compliant shell. This introduces additional context switching when administering or debugging remotely.
  • no_priority@sh.itjust.works
    link
    fedilink
    arrow-up
    11
    ·
    1 year ago

    I use fish because I have better things to do than tweak my shell configuration and debug shell plugins.

    When I tried oh-my-zsh and prezto (I think?) they came with tons of plugins that performed badly and made it hard to get things done (specifically, they ran git status synchronously on every new prompt, which does not work well in a moderately large repo). Fish had similar features but wasn’t horribly slow, so I use it.

    • ogeist@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      3
      ·
      1 year ago

      I’m also using fish shell, it find it very user friendly and extremely practical. It gathers all the programs options which you can see when pressing Tab and together with the fzf plugin for history and file search it becomes a very smart shell to use.

    • techwizrd@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      Same. I’ve written a fish plugin, but other than that I just fish pretty much stock. It works and just gets out of my way.

  • ozymandias117@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    1 year ago

    If you’re looking for a nicer shell for personal use, fish is pretty nice

    If you want to run arbitrary scripts and deal with setup scripts from coworkers etc, you’ll want to fall back to zsh/bash regularly, though

    If you’re fine with understanding when your shell is the problem, fish is nice for interactive use

  • marv99@feddit.de
    link
    fedilink
    arrow-up
    9
    ·
    edit-2
    1 year ago

    Let the religious shell wars begin … again

    Only right answer is of course TCSH. Not much documentation and support, ancient but still receives new bugs in 2021 (on Debian), but attackers hate it! (I love it)

    My real suggestion is to learn zsh and fish (and bash). Try using them for all your purposes and in the end you will automatically find the one (or more of them) that suits you best and that you like most for your daily tasks.

  • GnuLinuxDude@lemmy.ml
    link
    fedilink
    arrow-up
    7
    ·
    1 year ago

    I use Fish shell and while it is pretty nice on its own, the fact that it is non-standard does cause problems. Many times you will search for something online and you’ll find nice bash results, which either you will have to execute directly in bash or modify to work correctly in Fish.

    I don’t think all of Fish’s design choices are the best, either. But for an OOTB experience, it is nicer than either Bash or Zsh.

    • zaphodb2002@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      That’s actually a pretty good reason. Currently I own my work environments but that won’t always be the case, I’m sure.

  • yum13241@lemm.ee
    link
    fedilink
    arrow-up
    9
    arrow-down
    3
    ·
    1 year ago

    ZSH, ZSH, ZSH! Fish is not POSIX compliant, meaning most shell scripts won’t work and it has its own special snowflake syntax.

    Also, don’t use Oh-My-ZSH! Just use the package manager in your system.

    • pitbuster@lemmy.ml
      link
      fedilink
      arrow-up
      6
      arrow-down
      1
      ·
      1 year ago

      you can always run scripts with the shell they were written for (and you can even argue that people writing scripts should always set the shebang)

      • yum13241@lemm.ee
        link
        fedilink
        arrow-up
        1
        arrow-down
        3
        ·
        1 year ago

        If I have to switch shells all the time when another shell, zsh has the same functionality as fish, without the switching around, I’ll use that. Not to mention fish causes flatpak to not add Flatpaks to the app menu until restart. Environment variable messes. If I have to install a bunch of other stuff to make fish work, vs make zsh work more nicely, I’ll pick the 2nd one.

    • boyi@lemmy.sdf.org
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      edit-2
      1 year ago

      meaning most shell scripts won’t work

      What do you even mean? I run my bash script on Fish shell. No problem. Just need indicate the shebang at the top of the shell script.

      unless you want to run zsh/bash commands in cli mode - that’s a different story.

  • dieelt@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    I use zsh with a few customisations. I’ve used fish but it’s sometimes slow so I just stick to zsh.

  • mhz@lemm.ee
    link
    fedilink
    arrow-up
    7
    arrow-down
    1
    ·
    1 year ago

    Genuinly asking, what is wront/lacking in bash?

  • nickwitha_k (he/him)@lemmy.sdf.org
    link
    fedilink
    arrow-up
    6
    arrow-down
    1
    ·
    edit-2
    1 year ago

    I like zsh with oh-my-zsh and Powerlevel10k. This gives me a clear indication of which system I am on and remains POSIX-compliant.

    The biggest deal breaker for me for shells like fish are the they are not POSIX-compliant and I need to use remote systems regularly. Doesn’t make sense to use something with a different syntax to me.

  • Gamma@programming.dev
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    I learned Fish by helping someone else in a chat. There’s a lot of cool things, and I think it’s an excellent shell. Fish is an excellent choice for a shell.

    Zsh is a much more featureful language (with globbing/subscript/PE flags, native floating point arithmetic, the whole man zshmodules), which doesn’t necessarily make it a better shell. But I like those features, and I find it to be a natural choice to write more complex programs which normally would be a code smell for Bash.

    The plugin ecosystem for is much larger than Fish’s as well.

  • sf1tzp@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    1 year ago

    If you want you can install starship, which provides a lot of the nifty prompt customization I see in other people’s zsh configs. I’ve been using it with bash for a few months now and like it a lot.

  • zero@lemm.ee
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    I use Linux for work and I’m pretty much fully in bash. What’s the benefit of changing to a different shell? Will all my scripts still work?

    • ogeist@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      edit-2
      1 year ago

      I made myself this question and jumped to fish and never came back to bash. I now use mostly the terminal for most things together with ranger.

      If you decide to jump to fish install fish + fisherman + fzf

      Fisherman for installing themes and plugins and with it you install the fzf plugin. I also have the tide theme which is pretty nice.

      PS. Bash scripts still run as bash so there is no conflict.

    • zaphodb2002@sh.itjust.worksOP
      link
      fedilink
      arrow-up
      1
      arrow-down
      4
      ·
      1 year ago

      Zsh is just bash with plugins and stuff, so regular bash scripts work. fish, as I understand, uses its own language.

      • Andy@programming.dev
        link
        fedilink
        arrow-up
        5
        ·
        1 year ago

        Bash code is not safe to run as if it were Zsh, and Zsh has language features Bash doesn’t. They are different languages.

      • curioushom@lemmy.one
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        1 year ago

        That’s right. zsh is POSIX compliant while fish is not. That’s the reason I switched to zsh from fish.

  • RiikkaTheIcePrincess@kbin.social
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    Whoops, I forgot about this tab and now I’m late to the fish party 😅 I used to use customized zsh but have since switched to fish and it’s basically everything I had to work to get zsh to do, only without any of the work. It just is what I want from a shell, I just grab it from the nearest package manager and off I go.

    …Unfortunately for fish, that’s made me curious that there may be “another fish” out there somewhere that’s what I’d be struggling to turn fish into if I knew any better than I do now 🤣