Live data from Hacker News

Fish shell 3.0

github.com

51–60 of 227 posts

Re: Fish shell 3.0

#51

Does anyone know how it compare to zsh with oh-my-zsh?

Zsh + OMZ is a slow, unconfigurable mess. If you are new to Zsh, avoid OMZ. If you are experienced with Zsh, you already know to avoid it.

Fish "just works", and you won't have any lag. It is a delightful beginner experience, too.

A Zsh veteran could probably replicate parts of the Fish experience in Zsh, but ultimately they are different tools. I use Fish at home for casual shell stuff, but I write shell scripts in Zsh, and I use Zsh at work whenever possible.

Re: Fish shell 3.0

#52

Fish Shell has been having some problems implementing process substitution. Last I checked, they tried two approaches: * piping to FIFO files, but it throws an error if you pump too much data into them * waiting until one process finishes before starting another. That's not a correct implementation either Bash apparently resorts to black-magic.

[deleted]

Re: Fish shell 3.0

#53
post #37

I've been happily using fish for maybe two years now, just as a default shell and not doing anything fancy. Out of the box it is great. I'm not sure how to feel about only now learning its indexes start at a [1] though (╯°□°)╯︵ ┻━┻ Love it otherwise.

Starting at 1 is good for non-programmers, who IMO could benefit the most from switching to Fish. I would love to see a distro using Fish as the default shell for non-root users.

Re: Fish shell 3.0

#54

The one thing I miss most in fish is subshells, because I love writing things like ( (cd $dir && ./run_prog && cd PKG && ./do_stuff) & ), to run a series of things in the background. Is there any way to do something similar in fish?

I also do that, often with loops.

    for ((i=0;iout-$i.log 2>&1 ) & done
Can be anything from image processing, video transcoding, file decompression, file system analysis - anything I think may complete faster with some concurrency.

Re: Fish shell 3.0

#55

Does anyone know how it compare to zsh with oh-my-zsh?

even I am curious to know as well. some things I have found are fish is very fast, comes with syntax highlighting and auto suggestions from history.

one thing I have noticed is, some packages (I can't remember which, perhaps it was virtualenvwrapper?) come with tools which work with bash or zsh. I have rarely seen fish being mentioned.

edit: it was gcloud sdk and it added command line completions:

  # The next line enables shell command completion for gcloud.
  if [ -f /Users/avi/code/google-cloud-sdk/completion.zsh.inc ]; then
	source '/Users/avi/code/google-cloud-sdk/completion.zsh.inc'
  fi

Re: Fish shell 3.0

#56
post #18

The one thing I miss most in fish is subshells, because I love writing things like ( (cd $dir && ./run_prog && cd PKG && ./do_stuff) & ), to run a series of things in the background. Is there any way to do something similar in fish?

What this does is two things: - It keeps the state separate from the main shell, including $PWD (so the `cd` doesn't affect the main execution "thread") - It executes some script in the background Fish's backgrounding is currently limited to single external commands (not even functions). That's https://github.com/fish-shell/fish-shell/issues/238 . It also doesn't have the capability to keep $PWD separate, though othe…

Difference being that the fork is copy on write, so it can be quite a bit faster and need no initialization. Not to mention not needing to quote quotes and escape escapes.

Re: Fish shell 3.0

#57

Long time zsh user here. Any reason one should try out fish?

I was a long time zsh user too until a few months ago, when i tried to configure zsh line completion for a new tool. After a few hours of reading and trying I looked at how this other new she'll did it. Found the doc clear and the implementation clean, was able to solve my problem in no time. Havn't looked back although I'm not a big fan of breaking sh compatibility for many futile things, I welcome the simpler design.

Re: Fish shell 3.0

#58

Apart from the other good stuff in this release, I think this will make a lot of things much easier: fish now supports && (like and), || (like or), and ! (like not), for better migration from POSIX-compliant shells

That’s new? Suddenly I feel less guilty about dodging coworkers who have been trying for years to get other people to try fish.

But maybe now it’s getting closer to production readiness.

Re: Fish shell 3.0

#59
post #50

Earlier quoted context omitted.

Though I've really grown toward the 'everything as a function' pattern that Fish is trying to do, this is definitely a step back in the right direction. I might even wish for `$()` to be supported as well to allow even better copy pastable oneliners from Bash.

Your quoting is a bit confusing, as "`cmd...`" and "$(cmd...)" are similar,, while backtick-dollar-paranthesis is just asking for trouble... ;) I take it fish didn't / doesn't support either?

Fish uses parentheses for command expansion, so backticks aren’t supported and the dollar sign is only for variable substitution.
Post reply on HN