Earlier quoted context omitted.
The best reason to choose fish over zsh is that everything works so well out of the box that you stop messing with it. I haven’t tweaked my shell config in 7 or 8 months now. This is a different mindset from the giant zsh configs, “plugin managers” and other junk that is wholly irrelevant to using the shell. You’d think that fish incorporating a lot of functionality that zsh has would manifest as bloating fish, but,…
Another issue with zsh plugins is that they are incredibly slow. Oh-my-zsh makes every terminal feel like it’s running on another machine over ssh
The fish shell is amazing
241–250 of 302 posts
Re: The fish shell is amazing
#242Earlier quoted context omitted.
The reason is to preserve compatibility for everyone's configuration that they carefully built up over decades. It's quite hard to change things to enable some new thing without annoying many users. The last time that was tried was in the '90s and there are still zsh developers around who experienced the fallout. I value the fact that my shell doesn't change on me without warning like many GUI desktop environments. I…
Well, yeah, this is the problem. Throw new users under the bus in favour of old users.
Re: The fish shell is amazing
#243Re: The fish shell is amazing
#244Earlier quoted context omitted.
Have you just tried the following to run your bash one liners in fish? bash -c 'echo "hello"' Replacing echo "hello" with your script.
You could do that, but it would be pretty inconvenient in general, and more so when using quotes within the script. There would also be no autocomplete.
Re: The fish shell is amazing
#245Earlier quoted context omitted.
> while Fish has some nice out-of-the-box features, they’re all achievable in Zsh with a few lines of plugins. The point of fish is that there is no configuration required. You don't have to learn to configure it, you don't have to be part of "the community" to learn which plugins to use, you'll be able to sit in front of any fish prompt and have it work as expected without having to move dotfiles around.
> The point of fish is that there is no configuration required. I think it would be more accurate to say that the point of fish is that there is no configuration allowed . If you don't like the out of the box configuration, I would say configuration is still required , but it's unfortunately not available . If you happen to like every single decision the developers made, then I admit having no configuration does mean…
A: Linux is amazing, I can configure everything the exact way I want.
B: Linux sucks, I need to mess around with configurations for hours before I get something usable.
A lot of us just want something that works out of the box with amazing defaults. Others want something that can be tuned to their exact preferences. However, configurability comes with it's own costs too.
Re: The fish shell is amazing
#246As another commenter pointed out, while Fish has some nice out-of-the-box features, they’re all achievable in Zsh with a few lines of plugins. And did you know Zsh has a short for loop? Along with fantastic plugins like fzf-tab, I don’t see a reason to use anything else right now. Though, I’m keeping a very interested eye on Nu shell. They’re doing a lot of stuff right, and I expect it will become a very useful scrip…
Many of the features are also achievable with pure bash with ble.sh ( https://github.com/akinomyoga/ble.sh ).
Re: The fish shell is amazing
#247Earlier quoted context omitted.
The best reason to choose fish over zsh is that everything works so well out of the box that you stop messing with it. I haven’t tweaked my shell config in 7 or 8 months now. This is a different mindset from the giant zsh configs, “plugin managers” and other junk that is wholly irrelevant to using the shell. You’d think that fish incorporating a lot of functionality that zsh has would manifest as bloating fish, but,…
Even less ergonomic shells like bash can work very well out of the box if you just train yourself to use them. If you train yourself to use bash without any plugins, you'll be strong on any machine without any config. I went through a "distro hopping" phase at some point with Linux and ended up settling on a system with very little custom config. It's close to the defaults so I can work very comfortably even in a ran…
Re: The fish shell is amazing
#248I used fish for a couple of years and really liked it. But I recently learned that I can configure ZSH to have all of the same auto-complete and plugins that I loved from fish. Now I have all of the creature comforts I like, with POSIX compliance I found that while fish has better syntax than bash for most things, the hassles with incompatibility or unexpected behavior brought me much more trouble than BASH's syntax…
I don't get why people expect POSIX compliance from fish. Your interactive shell and your scripting shell can be, should be, and often are, different. I use bash as my default user shell, fish as the default shell of my terminal emulator, and I write scripts for both POSIX sh (dash and busybox ash) and bash. I end up using three different shells with different purposes. Sure, I could use zsh both as an interactive an…
Re: The fish shell is amazing
#249Earlier quoted context omitted.
Have you just tried the following to run your bash one liners in fish? bash -c 'echo "hello"' Replacing echo "hello" with your script.
You could do that, but it would be pretty inconvenient in general, and more so when using quotes within the script. There would also be no autocomplete.
But:
1. I have CTRL+R bound to fuzzy reverse history search via fzf in my Fish config. It works great. It's fast, and it's way better than the built-in Bash reverse history search imo, even though it works basically the same way (it should feel very familiar). fzf itself comes with the keybindings, so you don't have to sort them out yourself; you can just source 'em: https://github.com/junegunn/fzf/blob/master/shell/key-bindin...
2. For one-off one liners you see in GitHub repos or something, if you really want tab completion and syntax highlighting and whatever, you can just use `exec` twice:
⋊> ~ echo $HELLO
⋊> ~ exec bash
~ $ export HELLO=hello
~ $ exec fish
Welcome to fish, the friendly interactive shell
⋊> ~ echo $HELLO
hello
3. If you want to import your handy one-liners from your existing `.bash_history`, you could try using babelfish to automatically translate them, then import them into your Fish history: https://github.com/bouk/babelfishIt may not work right for some of them, but it's worked on the scripts I've tried. You might also be able to bind a key that translates whatever command there is on the prompt into Fish. It seems to handle the basics well, including subshells with redirection/process substitution, e.g.:
~ $ cat ~ cat (echo hi | psub)
hi
⋊> ~ exit
~ $
Babelfish is pretty fast. Maybe you could create a Fish keybind that searches through your bash history, only it's translated to Fish via babelfish? Then at least you could keep your existing history in a way :DRe: The fish shell is amazing
#250Earlier quoted context omitted.
Then you have to learn two languages. And switch from one to another when you need to do some scripting. I don't write shell scripts a lot, I prefer to write python scripts (that are more maintainable and simple to write). But I write complex commands in the shell a lot, for example I may need to convert a bunch of images from one format to another, just use a for loop with imagemagik directly from the command line,…
> Then you have to learn two languages. Why would I need do to that? > But I write complex commands in the shell a lot ... It's not rare that I write commands that are more than 5 lines long. Ah, well, yeah, in that case, you might wanna stick to ZSH. I don't write complex commands on the shell. If it's more than 1 line long, I will make it a script. Multiple lines of commands with, or without, backward slash separat…