Live data from Hacker News

Fish shell 3.0

github.com

41–50 of 227 posts

Re: Fish shell 3.0

#41
post #39

I was hoping to see that they added a `time` command, which is something that makes me change to bash every once in a while.

There's an actual program, usually installed in /usr/bin/time. The shell builtin is not really necessary.

Re: Fish shell 3.0

#42
post #35
post #14

Earlier quoted context omitted.

”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.

And when you do want to configure it, you can choose to use either config.fish or the web-based configuration tool. The web tool is very nicely thought out and lets you preview themes and such before you use them.

Yet the thought of a shell with a web interface made me shudder at first. Like those electron based terminal emulators.

Re: Fish shell 3.0

#43
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…

Forking off a subshell is very different, I would think, than forking and execing a new shell, both from a resource standpoint and an open file standpoint.

Re: Fish shell 3.0

#44

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

Finally! Fish 2.x shows you a message along the lines of "use `and` instead of `&&`", which is infuriating - it clearly knows what I want to do, and refuses to do it. I love fish and use it as my default shell, but I'm glad to see the fish team take a few steps towards bash compat.

That reminds me of the very specific nag messages I get from Python 3 when I don't write parens around parameters for print... do what I want already.

Re: Fish shell 3.0

#45
post #35

Earlier quoted context omitted.

And when you do want to configure it, you can choose to use either config.fish or the web-based configuration tool. The web tool is very nicely thought out and lets you preview themes and such before you use them.

Yet the thought of a shell with a web interface made me shudder at first. Like those electron based terminal emulators.

It's a python script, using python's http.server. If you're not executing `fish_config` explicitly, nothing is running.

Re: Fish shell 3.0

#46

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

I just switched back to zsh after using fish for a while. I found fish nice, but found the lack of POSIX compliance annoying when I wanted to modify things in my rc. I also just like the (oh-my-)zsh defaults better.

Re: Fish shell 3.0

#47
post #18

Earlier quoted context omitted.

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…

Forking off a subshell is very different, I would think, than forking and execing a new shell, both from a resource standpoint and an open file standpoint.

Not really from a usage perspective though, and resources often don't matter.

If you're doing something like this in the background, then that usually means it takes a "long" time (or you'd just wait for it). So the overhead of starting an additional shell simply isn't important.

Not that it's always irrelevant, but that's why the issues are still open.

Re: Fish shell 3.0

#49

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

I much prefer fish to zsh + omz. Most of the functionality is built in, and there are plugins for any missing ones (nvm is a big one).

Re: Fish shell 3.0

#50

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.

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?

Post reply on HN