Live data from Hacker News

Fish Shell 3.2

github.com

71–80 of 133 posts

Re: Fish Shell 3.2

#71

Earlier quoted context omitted.

> 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 wi…

hahha, cool hack! I'm still a bit irked that the text is there (but invisible), but this is the desired "normal" effect.

Re: Fish Shell 3.2

#72

Earlier quoted context omitted.

Same here. If you miss fish's smart auto-completion I can recommend this zsh plugin though: https://github.com/zsh-users/zsh-autosuggestions

Sadly, this plugin is a pale copy of fish's power - it isn't folder-aware (fish will offer different suggestions for different folders) and it isn't context aware (fish will try to autocomplete the current line based on the context of the current folder, zsh-autosuggestion will just blindly offer history line that starts with what's typed)

I just use tab complete if I want a file from my working directory, which I actually prefer.

If anybody else is using zsh-autosuggestions, it's really worth looking into configuring it rather than using it out of the box. It exposes some pretty cool options. It was sub-par out of box in comparison to fish, but after some tweaking I like it better. You can do things like ignore history based completions on certain commands (like git, I don't need my last commit message popping up)

Re: Fish Shell 3.2

#73

Fish is my shell of choice, like many in this thread. To me it just works, without configuring anything (ok, maybe a couple of aliases), with great defaults. As an example, type anything(for instance, '.conf') + up arrow, and there you see all the completions (for instance, 'less /etc/postgresql/10/main/pg_hba.conf' shows for me) based on the shell history. You can then cycle through them with up/down arrows. It is t…

It really is my pet peeve with fish, but the last command that started with what you typed cannot be completed that way. For that, you need to use right-arrow. I kept a fork of fish for that purpose for some time, but that was really too much hassle and I went back to zsh. Which is pretty sad, because otherwise fish is amazing.

ctrl + e or end will complete commands in that case

Re: Fish Shell 3.2

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

> it has the best support for vi key bindings

Yeah, maybe not the best. Once could say they're improving though.

> Vi mode bindings now support dh, dl, c0, cf, ct, cF, cT, ch, cl, y0, ci, ca, yi, ya, di, da, d;, d,, o, O and Control+left/right keys to navigate by word

Re: Fish Shell 3.2

#76

> Significant performance improvements to completion of the available commands (#7153), especially on macOS Big Sur where there was a significant regression (#7365, #7511). This is buried down in the Completion section but this is a big deal if you’ve upgraded to MacOS Big Sur: completing a command could hang the shell for 10-15 seconds making it nearly unusable. Thanks for fixing this!

This made my morning.

Re: Fish Shell 3.2

#77

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…

Thanks for sharing. I have a debian box that I try keep as standard as possible, and I think this setup would fit my environment well.

Re: Fish Shell 3.2

#78
post #37

I put off switching from bash for years but quit cold turkey for fish a couple of years ago, and find myself appreciating that almost daily. One of the underappreciated values is that while you can configure it you get great functionality out of the box. Switching was chsh, picking a theme in the interactive config, and going back to work. The only I’ve really felt the need to do was to add the Terraform workspace to…

I made myself use Fish for a week as an experiment. Day one was a little rough. Day two was easier. On day three I decided to customize my prompt, and after seeing how trivially easy that was (you write a fish function called "fish_prompt" that uses shell commands to build your prompt) compared to Zsh or Bash, I was... hooked.

Re: Fish Shell 3.2

#79
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'd just like to add that if you're considering the switch but are worried about compatibility with bash, things have gotten better. I wouldn't call it outright compatible, but the most problematic differences in syntax (e.g. the absence of &&) went away a few years ago. If it didn't quite stick the first time, I think it's worth trying again.

The parsing and setting of environment variables was always my #1 hassle with fish. I feel like I see a lot of BASH snippets that get copy pasted around that I always had to re-write or throw in a sub shell. Particularly annoying when you're trying to do something while screen sharing and somebody gives you a snippet which you have to re-write before using it- "Oh yeah it's a hassle but I've got sweet auto-complete" gets old

Re: Fish Shell 3.2

#80
post #52

Earlier quoted context omitted.

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?

I tried out many of the popular shells (bash, zsh, fish, etc) many years ago when my daily driver was an older thinkpad, and some of the startup times were painfully slow for me. It definitely drove me toward the more minimal shells like ksh and rc. On newer hardware it hasn't been noticeable, but it's real.
Post reply on HN