zsh or fish for an intermediate Linux user?

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.

no_priority,

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.

techwizrd,

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.

ogeist,

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.

etchinghillside,

When you’re working on a remote server you’re probably not going to have fish available.

zaphodb2002,

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

CombatWombatEsq,

You’re probably not gonna have zsh either, though, but I wouldn’t recommend using sh as your shell on your personal dev machine 🤷‍♂️

GnuLinuxDude,
@GnuLinuxDude@lemmy.ml avatar

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.

tetraodon,

In those cases, I simply switch to bash, do the deed, switch back.

marv99,

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.

nickwitha_k, (edited )

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.

cybervoid,

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,

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.
yum13241,

And as OP puts it, this “sintax” is a sin.

nickwitha_k,

If they’re taxing it now, that’s another reason to to avoid the non-POSIX shell :P

yum13241,

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,
@pitbuster@lemmy.ml avatar

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)

shotgun_crab,

There are also plugins like bass and replay.fish which do help with most of the work, if you ever need it.

yum13241,

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,

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.

ravermeister,
@ravermeister@lemmy.rimkus.it avatar

I like oh-my-zsh what are the downsides of using it?

yum13241,

It’s slow and unnecessarily bloated.

mhz,

Genuinly asking, what is wront/lacking in bash?

ozymandias117,

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

tun,

I tried fish and liked it.

But compatibility to bash is not great.

So I changed to zsh with zsh quick start kit (zgen and later zgenom). Zsh has more more community, frameworks and plugins.

Now I roll my own zsh config using zinit with turbo.

vivi,
@vivi@slrpnk.net avatar

I use fish with the bass plugin for any time I need to work with bash scripts.

iusearchbtw,
@iusearchbtw@lemmy.sdf.org avatar

bash with ble.sh! I’m a former fish user, and ble.sh replicates all of fish’s quality of life improvements (that I used, at least) and then some, all with a single source command in my .bashrc. And it’s still bash at the end of the day, so online resources to tweak and modify it all still work.

Shdwdrgn,

Still a bash lover after 24 years at the command line. 😄

zero,

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?

zaphodb2002,

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

curioushom,

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

tetraodon,

If you have #!/bin/bash on top of your scripts, they will use bash.

Andy,
@Andy@programming.dev avatar

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

OsrsNeedsF2P,

Power, convenience, customizability

Pretty much the same reasons you use Linux at all

ogeist,

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.

tun,

On Mac, zsh is default.

I use zsh with zinit (with turbo mode) or zgenom.

Zsh quick start kit and z4human (created by powerlevel10k author) are great starts if you do not want to invest on configuring zsh.

sf1tzp,

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.

Thaurin,

I use tide with fish and I personally prefer it over starship.

turbo_snail,

Thanks for pointing me at tide. I always used the pure prompt but tide looks like pure on steroids.

Thaurin,

Also look into the fzf plugin for fish. It’s the other plugin I use.

turbo_snail,

Thank you. Will take a look as well.

zitronen,
@zitronen@feddit.de avatar

Fzf doesn’t need fish, though. I use it with bash.

Thaurin,

Sure, fzf is fzf. This is a plugin for fish that integrates fzf with fish.

vaidooryam,

@Thaurin @zitronen what does it do in addition? For me fzf already replaces some of the keybinds to do history search, directory search, etc. What else is available on the plugin?

dieelt,

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

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • uselessserver093
  • Food
  • [email protected]
  • aaaaaaacccccccce
  • test
  • CafeMeta
  • testmag
  • MUD
  • RhythmGameZone
  • RSS
  • dabs
  • oklahoma
  • Socialism
  • KbinCafe
  • TheResearchGuardian
  • Ask_kbincafe
  • SuperSentai
  • feritale
  • KamenRider
  • All magazines