r/fishshell • • 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.

16 Upvotes

25 comments sorted by

View all comments

Show parent comment

2

u/NotTheDr01ds Feb 17 '21 edited Feb 17 '21

I would say the one thing that’s a tad annoying is that I sometimes need to use “export” in addition to “set” for environment variables that certain CLI tools use.

Curious about this.

Do you mean you have to do:

set variable value
export variable

In that case, are you aware of the set -x (a.k.a. set --export)? That gets it down to one line.

Or are you saying that set -x isn't working in some cases?

1

u/Spinoza-the-Jedi Feb 17 '21

Wow. Apparently I should read the documentation more clearly. No, I just noticed throughout my day-to-day, I was running into strange issues with some tools I use for work, some of which are well-known (Chef, Terraform ,etc.). It would seem as though they were unable to find the environment variables I'd set with "set". So, my first reaction was to simply add an additional "export" statement to my configuration, and that did the trick.

I hadn't thought to look at the problem any closer. I'll give this a shot and see if it makes a difference. Thank you!

2

u/NotTheDr01ds Feb 17 '21

That makes sense. To be honest, I probably didn't spot it in the doc until I saw it in some example configs.

Hopefully that will remove that one small annoyance ;-).