Live data from Hacker News

The fish shell is amazing

rmpr.xyz

121–130 of 302 posts

Re: The fish shell is amazing

#122
post #7

I used fish for a couple of years and really liked it. But I recently learned that I can configure ZSH to have all of the same auto-complete and plugins that I loved from fish. Now I have all of the creature comforts I like, with POSIX compliance I found that while fish has better syntax than bash for most things, the hassles with incompatibility or unexpected behavior brought me much more trouble than BASH's syntax…

The best reason to choose fish over zsh is that everything works so well out of the box that you stop messing with it.

I haven’t tweaked my shell config in 7 or 8 months now.

This is a different mindset from the giant zsh configs, “plugin managers” and other junk that is wholly irrelevant to using the shell. You’d think that fish incorporating a lot of functionality that zsh has would manifest as bloating fish, but, IMO the reality is that zsh’s “bloat” is pushed into user configuration and the user is tasked with making it work.

Re: The fish shell is amazing

#123
post #72

Earlier quoted context omitted.

Any suggestions? I’ve recent switched from vanilla bash to ZSH. I mainly use oh-my-zsh and Power10k. Once again the defaults without much customization.

Slimzsh[1] is a very nice default configuration. Just a slim prompt, fast-syntax-highlighting and some vanilla settings. I keep a personal fork with a few added plugins (most notably zsh-autosuggestions and ssh-agent). No need for a plugin manager. oh-my-zsh is way too bloated. But it's a nice repo if you're looking for plugins and aliases. [1]: https://github.com/changs/slimzsh

The popularity of OMZ with the performance issues and update nags really makes me wonder if people even notice or care about those two things.

Re: The fish shell is amazing

#124
post #7

I used fish for a couple of years and really liked it. But I recently learned that I can configure ZSH to have all of the same auto-complete and plugins that I loved from fish. Now I have all of the creature comforts I like, with POSIX compliance I found that while fish has better syntax than bash for most things, the hassles with incompatibility or unexpected behavior brought me much more trouble than BASH's syntax…

I don't get why people expect POSIX compliance from fish. Your interactive shell and your scripting shell can be, should be, and often are, different.

I use bash as my default user shell, fish as the default shell of my terminal emulator, and I write scripts for both POSIX sh (dash and busybox ash) and bash. I end up using three different shells with different purposes.

Sure, I could use zsh both as an interactive and scripting shell but I don't have the time or willingness to configure it when fish offers a nice out of the box experience. Not to mention that zsh shouldn't be used as a scripting shell in the first place.

Re: The fish shell is amazing

#126
post #16

As another commenter pointed out, while Fish has some nice out-of-the-box features, they’re all achievable in Zsh with a few lines of plugins. And did you know Zsh has a short for loop? Along with fantastic plugins like fzf-tab, I don’t see a reason to use anything else right now. Though, I’m keeping a very interested eye on Nu shell. They’re doing a lot of stuff right, and I expect it will become a very useful scrip…

zsh has this absolutely ridiculous case of feature shyness. It has tons of great features, which it goes to great lengths to hide from you for some indecipherable reason.

The reason is to preserve compatibility for everyone's configuration that they carefully built up over decades. It's quite hard to change things to enable some new thing without annoying many users. The last time that was tried was in the '90s and there are still zsh developers around who experienced the fallout. I value the fact that my shell doesn't change on me without warning like many GUI desktop environments.

In recent years the existence of frameworks like oh-my-zsh has contributed further to this situation because it has separated the detailed configuration from the base zsh project. It's a pity omz doesn't enable more really. Many things it does are not really useful unless you take the time to actually learn them. A lot of plugins just define aliases but if you don't know what they are, they just sit there unused.

Re: The fish shell is amazing

#127

Have you tried Oil Shell? http://www.oilshell.org/

I've not tried for a while but just getting that to even compile was a nightmare. It seemed to be a fork of the Python 2 code base. They've done the right thing by having a POSIX compatible layer but I completely disagree with their idea of what is wrong with the existing Bourne syntax and needs changing. An interactive shell needs to keep special characters to a minimum and stick to commands as the basic unit on which things are built. Zsh is already able to correct many of the worst elements of the Bourne syntax.

Re: The fish shell is amazing

#128
post #28

Earlier quoted context omitted.

This is my problem as well. I’ve been using fish for quite a long time, and I’m still frustrated by weird posix incompatibility.

>I’m still frustrated by weird posix incompatibility. Can you also share what are the most significant problems with posix incompatibility for you? Why is it a problem?

The one I see is really, all of Linux vs OSX/MacOS. And which version of Bash is shipped by default.

Internally we have a boot strap run book developers/operations to bring up either Windows/WSL or MacOS to a consistent shell env.

Re: The fish shell is amazing

#129
Vi mode was not good enough: first thing I do in a new shell is `set -o vi` and then try to do simple things: replace parts of words, copy/paste, search history. Fish in my experience was way worse than zsh and bash. Maybe things changed in the meantime?

Re: The fish shell is amazing

#130

Earlier quoted context omitted.

It's pretty common to copy-paste POSIX sh one-liners, or `source` a simple script. fish makes this annoying to do.

bash -c "PASTE_HERE"

That's annoying when you have complex quoting in the pasted script, but you can always do

    bash
    PASTE_HERE
    exit
Works for everything unless the pasted commands set variables you want to use.
Post reply on HN