Live data from Hacker News

Fish shell

fishshell.com

61–70 of 120 posts

Re: Fish shell

#61

Earlier quoted context omitted.

No. This is not RAS. It's a continuation of a long trend in *nix/FLOSS for using recursive acronyms. One of the earliest: GNU: GNU's Not Unix The one closest to me (though I didn't invent it): JACK - the JACK Audio Connection kit.

It is. See the difference: GNU Operating System -> GNU's Not Unix Operating System Fish Shell -> Friendly Interactive Shell Shell One expands to include the original acronym, but doesn't duplicate the descriptive extra words. The other doesn't expand to include the original acronym, but does duplicate the descriptive extra word. In other words, one is recursive but not redundant, the other is redundant but not recurs…

What about bash shell? Bourne Again SHell shell. That's the same thing. But i think it can be a helpful distinction between using bash shell as an interactive shell and using the bash scripting language.

Re: Fish shell

#62
I really like fish shell. After ditching bash and picking up ksh for its much nicer array notation, I needed a frontend shell, and it really fits the bill. Its defaults are really friendly, and it is very configurable.

Re: Fish shell

#63
>” Finally, a command line shell for the 90s”

I had a good laugh when I read the title of the website praising to be modern 31 years ago.

Re: Fish shell

#64
post #16

So the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily a…

I really don’t get this argument. In my shell I don’t type scripts on the prompt.

I use fish most of the time as a shell, but I still write bash or even sh scripts, because fish is not installed on most systems. If you run a bash script from fish, it is still executed by bash (because of the shebang).

Re: Fish shell

#65
post #64
post #16

So the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily a…

I really don’t get this argument. In my shell I don’t type scripts on the prompt. I use fish most of the time as a shell, but I still write bash or even sh scripts, because fish is not installed on most systems. If you run a bash script from fish, it is still executed by bash (because of the shebang).

But one of the selling points of fish is (from their website, I am not a user) that it has sane scripting.

That point appealed me most. If I continue have to use bash for scripting, I wonder what fish provides over zsh.

Re: Fish shell

#66
post #16

So the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily a…

I think this warning is actually harmful: Years ago, I read this argument about fish and it turned me completely off using it.

Only more recently have I really realised this never applied to 99% of my (most people's?) use-cases.

The logical step many people miss is that shebangs make the compatibility of the user's shell largely irrelevant: the only real compatibility concerns are the bash version or `sh` aliasing on the user's system.

e.g. making bash scripts compatible with current macOS systems (outdated bash version and bsd-ish non-gnu binaries) is a far bigger pain than any compat issues fish brings.

Re: Fish shell

#67
post #16

So the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily a…

About 98% of common POSIX shell usage is covered by fish, right down to identical syntax. (Not everything is.) Biggest tip for fish switchers: set fish as your terminal's shell instead of changing your login shell.

what's the difference between the two for the non initiatives?

Re: Fish shell

#68
post #64
post #16

So the massive drawback of fish is it's incompatible with bash (and other shells people use). If you're in fish, this is easily remedied because almost every machine has bash too. However, you can't expect another machine to have fish. However, I just really like fish. I also live out of my own shell, and I don't spend much of my life remote-ing into other machines. When I do, my mind flips into bash just as easily a…

I really don’t get this argument. In my shell I don’t type scripts on the prompt. I use fish most of the time as a shell, but I still write bash or even sh scripts, because fish is not installed on most systems. If you run a bash script from fish, it is still executed by bash (because of the shebang).

Even something like

   # only test if the build succeeds
   ./build.py && ./test.py 
didn't work in fish until recently. It used to be 'and' but they recently added && for compatibility.

I think redirects and possibly pipelines work differently in fish too, although I don't remember the details. I type those on the command line frequently. I occasionally use loops as well, though when it gets big I do put it in a file.

Re: Fish shell

#69

Nit: Fish Shell is a bit redundant, as Fish stands for "Friendly Interactive Shell". Now that's out of my system, fish is fantastic and made me realise importance of sensible defaults. I tried zsh but configuration took longer than I would have liked, and oh-my-zsh is too bloated to start instantly. Compared to that, I have practically 0 modifications in my Fish config, apart from few aliases. I don't use fish for mo…

They could have written "Fish the shell" to disambiguate from "fish the animal" and nobody would have complained. But they left out "the", and now it's redundant?

Isn't it funny how the mind works?

Re: Fish shell

#70
post #64

Earlier quoted context omitted.

I really don’t get this argument. In my shell I don’t type scripts on the prompt. I use fish most of the time as a shell, but I still write bash or even sh scripts, because fish is not installed on most systems. If you run a bash script from fish, it is still executed by bash (because of the shebang).

But one of the selling points of fish is (from their website, I am not a user) that it has sane scripting. That point appealed me most. If I continue have to use bash for scripting, I wonder what fish provides over zsh.

I think fish's syntax is cleaner, though as others have pointed out, the incompatibility is often not worth it.

Even though it's "sane", I would say it's not "powerful". It's significantly less powerful than bash, e.g. there is a list of missing things here:

https://github.com/pirate/fish-utils/blob/master/README.md

The first one seems like one of the bigger issues: https://github.com/fish-shell/fish-shell/issues/159

I have a particular viewpoint since I'm writing a shell for scripting, and I wrote this FAQ. http://www.oilshell.org/blog/2021/01/why-a-new-shell.html#wh...

But I didn't come up with that list of issues, and I've only used fish a tiny bit.

Post reply on HN