Live data from Hacker News

Fish shell 3.0

github.com

11–20 of 227 posts

Re: Fish shell 3.0

#11

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

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.

Re: Fish shell 3.0

#12
post #8

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

Coming from ZSH, Fish is a shell that just worked out of the box for me. It did everything ZSH did but I didn't have to touch a single configuration file to make it work. With ZSH I was forced to find all the options I wanted enabled and tuned or had to resort oh-my-zsh or templates from others to get all the good stuff. Managing dotfiles across workstations and servers. With Fish about the only thing I do after inst…

> It did everything ZSH did

... and some additional things that you can't do in zsh without plugins, such as autosuggestions[0].

[0]: https://github.com/zsh-users/zsh-autosuggestions

Re: Fish shell 3.0

#13

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

Awesome! I remember bumping into the github issue over it but I guess I didn't read far enough (or maybe it was long ago) to see that they were finally going to support && and || instead.

Re: Fish shell 3.0

#14
post #8

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

Coming from ZSH, Fish is a shell that just worked out of the box for me. It did everything ZSH did but I didn't have to touch a single configuration file to make it work. With ZSH I was forced to find all the options I wanted enabled and tuned or had to resort oh-my-zsh or templates from others to get all the good stuff. Managing dotfiles across workstations and servers. With Fish about the only thing I do after inst…

”Fish is a shell that just worked out of the box for me”

Same here. Fish’s configuration defaults are very well thought out and incredibly smooth. My config.fish is only nine lines.

Re: Fish shell 3.0

#15
post #8

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

Coming from ZSH, Fish is a shell that just worked out of the box for me. It did everything ZSH did but I didn't have to touch a single configuration file to make it work. With ZSH I was forced to find all the options I wanted enabled and tuned or had to resort oh-my-zsh or templates from others to get all the good stuff. Managing dotfiles across workstations and servers. With Fish about the only thing I do after inst…

I have started a lot of unsophisticated shell users with Oh My Zsh which works great without any configuration, and is what I use myself.

I can see how its easier to just make sure Fish is installed, but in some situations (NFS home directory mount and zsh already available) it is easier to install oh my zsh in HOME.

https://github.com/robbyrussell/oh-my-zsh

Re: Fish shell 3.0

#16
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?

Re: Fish shell 3.0

#17
So weird. Last night I ran a bunch of updates and spent some time cleaning up and configuring my laptop. Preparing for the New Year. I tried to upgrade Fish and saw that it hadn't had an update since this time last year. I ended up looking through the release logs and just reading the Fish docs a bit. I never do this. Now, this morning, this is on Hacker News.

Re: Fish shell 3.0

#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 other variables can of course be declared locally. That's https://github.com/fish-shell/fish-shell/issues/1439.

The workaround is, if you actually need this, to run it inside `fish -c`. Which is essentially what this syntax is doing in the background anyway (it needs to fork off because `chdir` applies to the entire process).

(Disclosure: I'm a fish developer)

Re: Fish shell 3.0

#19

So weird. Last night I ran a bunch of updates and spent some time cleaning up and configuring my laptop. Preparing for the New Year. I tried to upgrade Fish and saw that it hadn't had an update since this time last year. I ended up looking through the release logs and just reading the Fish docs a bit. I never do this. Now, this morning, this is on Hacker News.

It's not weird, it's a cognitive bias:

Frequency illusion (or Baader–Meinhof effect): The illusion in which a word, a name, or other thing that has recently come to one's attention suddenly seems to appear with improbable frequency shortly afterwards.

https://en.wikipedia.org/wiki/List_of_cognitive_biases

Re: Fish shell 3.0

#20
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.

Post reply on HN