Live data from Hacker News

Fish Shell 3.2

github.com

51–60 of 133 posts

Re: Fish Shell 3.2

#51
post #8

Fish is my shell of choice for a couple years now. Not because it's the perfect shell, but because it's a lot better than any other for interactive shells. For scripting I still stick to bash because it's more portable and I already know how to cope with its warts. And sometimes when I can't remember the fish syntax by heart, I just launch a bash from inside fish to run my command and then Ctrl-D :-)

Same here. Fish makes certain things easier (working with variables, for example) but sometimes I still drop a bash shell.

Re: Fish Shell 3.2

#52
post #36

Folks make a big deal about everything Fish gives you out of the box, but for someone who already has Zsh well–configured (eg. syntax highlighting, autosuggestions, fzf), can someone sell me on things I might be missing out on from Fish?

Assuming zsh is already doing everything you want the biggest thing you're missing is speed.

WTF are you doing where shell "speed" is the bottleneck? How does it happen that your shell starts "slow". This post has lots of speed comments. I don't get it. Are bash pipes slower than others? Do folk have a shell that takes longer than 250ms to start?

Re: Fish Shell 3.2

#53

I'd like to use fish regularly, but I feel really attacked by the over-the-top usage of color and unrequested auto-completion. Even a "monochrome" theme I tried was shoveling many different shades of gray into my terminal. It does not seem to honor the NO_COLOR variable either. Is there any way to obtain a default configuration with everything disabled?

It's a good point, but how many of the features are useful without any colors at all? At least the auto-completion would just look like any typed text. Perhaps fish is not for you?

> Perhaps fish is not for you?

It nearly is! I love fish powerful completion, just find it annoying that it is triggered automatically. Also fish syntax seems saner than bourne's, and I love it (but miss process substitution from time to time). Unfortunately, I cannot stand the flashiness. With some work, I have managed to disable all colors by setting a lot of fish_color variables in my configuration file. But the auto-completion drains me after a few minutes of use. As if you are speaking to somebody and they complete all your sentences! Even if the completion is correct, isn't that extremely annoying?

Re: Fish Shell 3.2

#54

I used fish for a couple years but switched back to zsh. I found the incompatibilities with bash/zsh to be annoying at times and finally just decided to do the "When in Rome do as the Romans" do thing and adopt zsh.

Same here. If you miss fish's smart auto-completion I can recommend this zsh plugin though:

https://github.com/zsh-users/zsh-autosuggestions

Re: Fish Shell 3.2

#55
post #15

Earlier quoted context omitted.

Many of us use it, I personally in my daily basis development Fish shell is pretty neat and increases productivity in terminal. However I still use Bash in the server side where I need for example, explicit error aborting like `set -e` that Fish doesn't have yet. https://github.com/fish-shell/fish-shell/issues/510

set -e is not great and is not recommended. http://mywiki.wooledge.org/BashFAQ/105

I read this as "bash has unintuitive footguns" rather than "set -e has unintuitive footguns with its usage".

Re: Fish Shell 3.2

#56
post #3

I'm surprised that Fish isn't used more for education. I don't know of any distros aimed at new users which have fish as the default. I don't think I've seen any tutorials that use fish to teach shell concepts. It seems like such a missed opportunity, especially at a time when Linux Gaming is on the rise. There's a whole audience that would have the activation energy of getting into shell scripting lowered by being s…

[deleted]

Re: Fish Shell 3.2

#57
post #3

I'm surprised that Fish isn't used more for education. I don't know of any distros aimed at new users which have fish as the default. I don't think I've seen any tutorials that use fish to teach shell concepts. It seems like such a missed opportunity, especially at a time when Linux Gaming is on the rise. There's a whole audience that would have the activation energy of getting into shell scripting lowered by being s…

This is probably due to the fact that fish isn't 100% POSIX compliant. A lot of commands new users see on the web won't work properly in fish shell.

For example, you couldn't set environment variables for one command in fish like you could in other shells until the last minor version (3.1).

I'm glad fish is becoming more like other more standard shells while maintaining its user-friendliness.

Re: Fish Shell 3.2

#58
post #7

Fish is my favourite shell because among other things, it has the best support for vi key bindings. I have been using the master version of it without any issues for more than half a year now for the undo / redo support and I'm glad the team has finally released it to stable. Thanks to everyone who worked on this! If anyone is reading this and is using vi mode with bash or zsh, give fish a try, it's so much better!

That's odd. bash and zsh had leagues better vi bindings the last time I tried. fish had tons of weird errors, most notably that things like `d2w` simply don't work. I actually had to stop using fish and go back to zsh because I couldn't get past the lack of vi support.

Apparently, https://github.com/fish-shell/fish-shell/issues/4019 still has not been fixed. There's no similar issue in bash/zsh.

Re: Fish Shell 3.2

#59
post #36

Folks make a big deal about everything Fish gives you out of the box, but for someone who already has Zsh well–configured (eg. syntax highlighting, autosuggestions, fzf), can someone sell me on things I might be missing out on from Fish?

Not having to fight against POSIX. Arrays are first-class, strings don't split when you don't want them to, things that could be builtins generally are builtins instead of inscrutable syntax.

Command output is split on newlines, which turns out to work really well with most Unix tools and only breaks on the most pathological of filenames. The newbie-ism `for f in (ls)` isn't actually harmful in fish.

Autocomplete definitions are very straightforward and declarative, so writing your own is easy. See https://fishshell.com/docs/current/cmds/complete.html#exampl.... zsh's system is more intimidating. (I even contributed completions for a few commands to this release of fish.)

Re: Fish Shell 3.2

#60

Earlier quoted context omitted.

It's a good point, but how many of the features are useful without any colors at all? At least the auto-completion would just look like any typed text. Perhaps fish is not for you?

> Perhaps fish is not for you? It nearly is! I love fish powerful completion, just find it annoying that it is triggered automatically. Also fish syntax seems saner than bourne's, and I love it (but miss process substitution from time to time). Unfortunately, I cannot stand the flashiness. With some work, I have managed to disable all colors by setting a lot of fish_color variables in my configuration file. But the a…

I think what you are talking about are the fish "suggestions". By default, that text is greyed out and if you like the suggestion, you can cursor-right (or ctrl-f) to accept it. But if you don't like the suggestion, you just keep typing.

If my hunch (that you are talking about the suggestions) is correct, then perhaps it works to set it to white on white or black on black, or whatever matches your color scheme. It will still be there, but you won't see it :-). (But you would get it after cursor-right or end or ctrl-f or ctrl-e...)

Post reply on HN