Live data from Hacker News

Fish Shell 3.2

github.com

21–30 of 133 posts

Re: Fish Shell 3.2

#21

I always see these posts, get tempted to use fish instead of bash but then I ask the ubiquity question and end up saying "Not today..."

It deserves a try! However don't get tempted to think that Fish is Bash drop-in replacement, personally I can not be more disagree with that idea.

Bash is a pretty useful and powerful scripting too, especially in server side (among other big list of stuff as you know).

Re: Fish Shell 3.2

#22

I think Fish is an excellent interactive shell. I've still got Bash as my default shell for non-interactive sessions, but I configured Konsole to start Fish by default for interactive use (Settings->Command, set to the path to the fish executable). That way scripts that need Bash still work, but I get a sane environment for interaction. For "portable" scripts I write POSIX shell, C, or Python, depending on what I nee…

Fwiw fish_add_path doesn’t fundamentally change anything, users do get confused between global and universal variables and how they interact with exported variables like PATH, so this just makes it friendlier.

Re: Fish Shell 3.2

#23
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 :-)

I switched to fish a very long time ago (2009 maybe?) because it started up so much faster than zsh w/ all the plugins that it took to get the fancy features fish had out of the box. Since then, fish has only become a lot faster as we have focused on performance and optimizations considerably.

I tried zsh after fish and my impression was somewhat like this: Okay, so I got to do a lot of customizing to get this to work nearly as well as fish does out of the box - can't be bothered!

Re: Fish Shell 3.2

#24

Earlier quoted context omitted.

The ubiquity question?

bash is installed by default on pretty much everything but for fish I need to un-learn bash shenanigans like `esac` which I fear would hurt more than help in general. Either that, or maybe I'm just lazy and missing out on a nice tool...

Fish made me write better bash scripts because it gave me a proper understanding of IFS, test, and other shell “basics” since it removes a layer of automagic by simplifying the syntax. Eg fish discourages the use of `if [` and it makes you realize that the bracket isn’t a grammatical construct but rather a terribly named command.

Re: Fish Shell 3.2

#25
I see a lot of enthusiasm for fish. Can someone point me to some resources that I can check?

Not the best comparison but: vim has vimtutor, a couple of good vim games and so on. Is there anything for fish?

Re: Fish Shell 3.2

#26
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!

> If anyone is reading this and is using vi mode with bash or zsh, give fish a try, it's so much better!

Great to hear that. I am using vi key bindings wherever it's possible, for example, text editing, Firefox(vimium) and file manager(ranger). But I have never been able to figure out how to use vi mode effectively in the shell prompt. The last time since I tried vi mode in shell was at least 5 years ago. I could roughly remember that vi mode bindings conflicted with certain oh-my-fish plugins I had installed. Even worse factor was that, I didn't know how to do certain things in vi mode, for example "M-." key to yank last argument from previous command. So I gave it up in the end.

Would you mind sharing what plugins do you use? And how do you work efficiently with vi mode? Thanks ahead.

Re: Fish Shell 3.2

#27
>A new "fish_add_path" helper function to add paths to $PATH

Yes! Modifying PATH has always been cumbersome compared to bash-like shells. This is a welcome addition.

Re: Fish Shell 3.2

#28
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

Agree with the "false positives" however in combination with error handling I don't see why not use it.

Re: Fish Shell 3.2

#29
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!

> If anyone is reading this and is using vi mode with bash or zsh, give fish a try, it's so much better! Great to hear that. I am using vi key bindings wherever it's possible, for example, text editing, Firefox(vimium) and file manager(ranger). But I have never been able to figure out how to use vi mode effectively in the shell prompt. The last time since I tried vi mode in shell was at least 5 years ago. I could rou…

I’m a die-hard vim user and a fish developer but (gasp!) I don’t use vi mode in fish or any other shell. Alt-V will open $EDITOR with the command line contents preloaded into the buffer and update the prompt on exit, I find that to be good enough without the frustration of trying to convert the prompt into a text editor when it’s not.
Post reply on HN