Live data from Hacker News

Fish shell

fishshell.com

41–50 of 188 posts

Re: Fish shell

#41
post #15

Fish is great. For those wondering what advantages is has over zsh+ohmyzsh, I can say is that by default it provides most the functionality you want without having to install/tweak anything. Git support is built in (you get a nice git prompt) there's syntax highlighting, amazing history completion, predictive commands, man page completions... and so on. To try it on linux, just install fish and then run "fish", to ge…

That was precisely my first question, so thanks for the answer, but I don't really see how that's enough to switch… I've been using this "cleaned up/opinionated" fork 'Prezto' for a while now: https://github.com/sorin-ionescu/prezto If I'm motivated enough to download and install a shell, why wouldn't I just clone Prezto and change one config file to turn on syntax highlighting and git support? Especially when it doe…

It's been many years since I've use zsh, so I won't pretend to know what's state of the art with it. I will say that one of the reasons I use fish is it's incredibly easy to customize. My old bash config just came along with me from years of use. Some of it I understood, some of it was just culled from the Internet and kept working, so I kept around (see: prompt customization). But, other than simple aliases, env var setting, and the occasional function, I didn't bother much with shell customization. I find fish simple enough that I can write a new function or tab completion and not have to spend a day figuring out the bash syntax again.

Writing tab completions in fish is really, really simple. It's the thing that initially sold me and it's kept me hooked.

The history is more powerful than bash, too. Although I find it sometimes works against me. E.g., since it tries to guess your command, things you type in lowercase suddenly turn to uppercase until you manage to disambiguate from a previous command.

If you're looking for plugins, there's oh-my-fish [1]. Years back, the term "fish-nuggets" was popular and you'll find repos named that on GitHub with other configuration. I use a couple plugins, but for the most part I don't need them. I think part of that is because fish is featureful out of the box and part of it is because customizing is so easy. I'll usually just add what I need myself rather than trying to find a general purpose plugin.

Anyway, not a direct answer to your question -- apologies for that. Hopefully something in there is of use for you, however.

[1] -- https://github.com/bpinto/oh-my-fish

Re: Fish shell

#42
post #37

Hyperpolyglot has a nice breakdown of the differences between bash, zsh, and fish. http://hyperpolyglot.org/unix-shells

Hyperpolyglot's typography, colors, layout and simplicity are beautiful.

Re: Fish shell

#43
Since Apple seems forever stuck on an ancient Bash version (due to GPL 3, I believe), I keep hoping they switch to Fish (or a home built solution, à la Swift, which could be interesting) with every OS release.

Re: Fish shell

#44
post #12

How does this compare with zsh + ohmyzsh?

Much faster, but much less configurable. If you have a decent config on ohmyzsh already, and it doesn't take too long to start up (you have an SSD), there is little point in switching to fish IMO. Especially if you use a lot of these things: https://github.com/fish-shell/fish-shell/issues?q=is%3Aissue...

I've been using fish for a while, but generally don't go crazy customizing my shell. What makes it less configurable? It'd be helpful to know what pitfalls to avoid.

Re: Fish shell

#45
post #38

I used to use fish, and emacs. But when I switched to vim, I had to switch away from fish as well because of its lack of vi bindings. It is a little disappointing to go back to using bash, but as long as bash-completion is working, it's not really a big issue. Of course, I do miss the syntax highlighting. (I would use zsh, but it provides little benefit over bash out of the box and is slower (oh-my-zsh is unbearably…

I run zsh barebones, and I've never been able to get some tab completions to work on bash as well as in zsh. But it's probably possible. E.g. on some patterns involving *. Care to share your setup?

No, my bash is mostly the default that Debian provides (only semi-relevant option I have enabled is globstar, which is just the recursive globbing). I guess I didn't mean that zsh wasn't that much better, just that I didn't think it was that much better.

I may switch to zsh eventually, but I just switched shells and I don't really want to do it again very soon.

Re: Fish shell

#46
I definitely recommend fish to every newcomer to Unix. It has sane defaults, colorful output, and so many features that work out of the box.

That said, there is a long-standing issue regarding inline environment variables.[1] Briefly speaking, fish does not recognize the `NAME=value command` form. So you should use `env` to work around this. This may not be a deal breaker, but I'm a bit annoyed, and migrated to zsh.

I would call zsh the opposite to fish. It has insane defaults, is highly customizable, and has so many features that are initially disabled. After hours of configuring it, I loved it.[2] Since then whenever I set up a new Unix machine zsh has been the first thing to install.

So, I would recommend zsh for the people who are used to Unix. If not, or you don't bother to customize it, there's always fish. There is no place for bash.

[1] https://github.com/fish-shell/fish-shell/issues/438

[2] https://github.com/barosl/baroslized-settings/blob/master/.z...

Re: Fish shell

#47
post #38

Earlier quoted context omitted.

I run zsh barebones, and I've never been able to get some tab completions to work on bash as well as in zsh. But it's probably possible. E.g. on some patterns involving *. Care to share your setup?

No, my bash is mostly the default that Debian provides (only semi-relevant option I have enabled is globstar, which is just the recursive globbing). I guess I didn't mean that zsh wasn't that much better, just that I didn't think it was that much better. I may switch to zsh eventually, but I just switched shells and I don't really want to do it again very soon.

Debian uses dash actually, not bash. I rather prefer it that way since dash is strictly POSIX compliant. Takes some of the tediousness out of creating portable shell scripts.

Re: Fish shell

#48
post #46

I definitely recommend fish to every newcomer to Unix. It has sane defaults, colorful output, and so many features that work out of the box. That said, there is a long-standing issue regarding inline environment variables.[1] Briefly speaking, fish does not recognize the `NAME=value command` form. So you should use `env` to work around this. This may not be a deal breaker, but I'm a bit annoyed, and migrated to zsh.…

Using `env` is very much a feature, not a bug. It's part of fish's philosophy to use programs rather than builtins wherever possible. It's good practice to use `env` even when using other shells.

Re: Fish shell

#49
post #10

Earlier quoted context omitted.

The shell is completely independent of the terminal emulator. Fish is the former, while you're complaining about an example of the latter. (My recommendation for a terminal emulator would be urxvt with the tabbedex extension. YMMV.)

I have seen many people recommending urxvt. What is the advantage of it compared to gnome-terminal ? The last time I tried it, it's default font size was too small and I didn't like the font. Does it take some fiddling (configuration etc) with urxvt to bring it a minimal usable state ?

I would describe it as the simplest fastest least buggy terminal available that supports tabs and unicode. So I have tabs for each machine and tmux sessions on each of those machines, kind of 2-dimensional. As you'd guess for something with a full name of "unicode-rxvt" the unicode support is bulletproof, perhaps the best out there of all possible terminals although it varies over time.

As simple as possible, and no simpler.

It does nothing that impresses other terminal authors. Other terminal authors seem to prioritize user experience beneath keeping up with the achievements of other terminal authors. So it is completely incapable of 3-d widget animations, or transparent viewing of 3-d accelerated VDPAU movie rendering via transparency, or any number of things that are extremely technically challenging and "desktoppy" and very impressive to other terminal authors but users primarily see as something that makes it slow and crash alot and complicated and distracting.

Re: Fish shell

#50
post #46

I definitely recommend fish to every newcomer to Unix. It has sane defaults, colorful output, and so many features that work out of the box. That said, there is a long-standing issue regarding inline environment variables.[1] Briefly speaking, fish does not recognize the `NAME=value command` form. So you should use `env` to work around this. This may not be a deal breaker, but I'm a bit annoyed, and migrated to zsh.…

Just to add to the first line, it also seems fairly well-commented in the code, at least the couple pieces I've looked at. This is really good for me as I often check the source first and helpful (or any) commenting is quite rare.
Post reply on HN