There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

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.

shotgun_crab ,

Both are good (and Bash too). Try them all and choose the best one depending on the context. For example, on my main PC I use fish with a few plugins (and fisher as the manager), but I’d never use it on a server due to it not being POSIX compliant.

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.

fhein ,

Don’t know how much “minor customization” is to you, but perhaps try adding some major stuff before giving up on it. Personally I started with prezto, customised it, and added a few things like fzf. Fish is probably nice too but I haven’t got around to giving it a fair try.

mhz ,

Genuinly asking, what is wront/lacking in bash?

gamma ,
@gamma@programming.dev avatar

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.

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

RiikkaTheIcePrincess ,
@RiikkaTheIcePrincess@kbin.social avatar

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 🤣

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

haroldstork ,

Been using fish for awhile. I don’t need much more than smart autocomplete (which is built in) and some small QOL plugins. Sometimes it sucks because the syntax is slightly different than bash or zsh so you will have to get used to that.

dieelt ,

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

Revanee ,

Fish, it just works. Customization is super simple and has a really nice webui if you’re into that sort of stuff. Plugins are easy to install with fisher. Out of the box it’s very ergonomic and you don’t have to deal with tons of scripts that may need debugging. Custom shell functions take 2 seconds to set up. Scripts use a shebang to specify the shell they run in, so you shouldn’t have any issues with that. Whenever I absolutely need to run a command with bash, I just switch to it, do what I need to do, and hop back to fish. Highly recommend, haven’t looked back since I started using it a few years ago :)

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.

Starbuck ,

I’d like to agree with most of the people here and say that while I have a great local zsh setup, 95% of the time I’m working on some other system in the cloud that only exists for a few days at a time and will only ever have bash and basic vim-enhanced, so I never really get to use my oh-my-zsh setup.

throwawayish ,

So, initially I stuck to bash and tried to get improved functionality through ble.sh etc. However, for reasons unknown to me, it always seemed to be a buggy mess that was prone to break. Eventually I switched after breaking one last time, where I only had installed ble.sh on a fresh/stock bash; which was the primary contributor that made bash bearable. So if I couldn’t use ble.sh, I had no reason to stick to it.

When faced with the choice of where to go next, I quickly dismissed fish for not being POSIX-compliant. Furthermore, as bash is standard on Linux, so too is zsh standard on macOS. And that enables it to have legs beyond fish. However I also kept fish in mind as somewhat of a last resort if all else failed.

So I began venturing into zsh and was obviously overwhelmed by the myriad of plugins and plugin-managers. People generally go out and somehow stick to ohmyzsh, however it was clearly poorly managed and couldn’t quite deal with the feature-creep in an elegant way.

Many plugin-managers have come out over the years as alternatives that promised to resolve those issues. However, while some of them succeeded initially, they weren’t able to keep that up throughout their lifespan.

When I almost lost hope and had started to gravitate towards learning how I should manage my plugins on my own without any plugin-managers I stumbled upon ZSH Quickstart Kit. Which is a project that’s clearly well-maintained and offered must-have functionality like automatically updating the the plugin-manager, plugins and more while still trying to maintain a high standard of reliability, performance, customization and minimalism. So obviously I had been sold on it and the rest has been history.

Ultimately it’s for you to decide whichever one of the two suits you best. But if you gave zsh a try and wasn’t quite sold on ohmyzsh or any of the other plugin-managers out there, then perhaps consider ZSH Quickstart Kit.

waspentalive ,

Are you in a tech support role at work? If so are you supporting Linux boxes, either servers or desktops? If yes then stick with BASH and learn VI - not because it is better, but because it comes with almost every distro (a small number install nano instead). If not, try out all the new stuff and see what suits you.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines