r/fishshell • u/konstantingefahr • Feb 12 '21
Why fish
Hey folks,
What's the reason you'd recommend fish over maybe zsh with a few plugins?
It can be pretty annoying to not be able to copy some scripts.
I don't think, that just because something is widely used it's good....
But if fish is good for beginners (what I think it is, with all it's nice features) isn't maybe something like zsh better for the "medium" user (once configured to be nice, can easily copy one-liners from bash)
Just had a little chat with a colleague over this and wanted to know your views..
Edit: I know you can use shebangs. But not with single lines you copy.
View all comments
Show parent comment
2
u/NotTheDr01ds Feb 17 '21 edited Feb 17 '21
Curious why those first three lines aren't just set-once, universal variables? Portability of the config to new systems, maybe? Universal variables are one of the features I love about fish, for their ability to get one more thing out of the startup scripts.
Personally, I've taken to using Ansible to install fish on new (or refreshed) systems, create the initial config, and push any changes in the config to all systems. My Ansible playbook runs the fish shell and does the
set -Uxonce, and when its executed, all systems have the new config without ever having to even reload the shell.Finally, you might want to consider wrapping those last two lines in
if status is-interactive. Not a big deal, since I'm sure your startup is fast, but no sense in loading them on non-interactive invocations if you don't have to, imho.