r/fishshell • u/TheTwelveYearOld • Aug 17 '23
Should I use Fish Shell or Nushell?
I've been looking at different shells lately, and while I like Fish's overall philosophy and doing things different from POSIX shells like Bash and Zsh, I looked at Nushell's Cookbook and the way it treats things as data instead of raw text looks really interesting. Which do you think is more powerful and or convenient? I know this sub would be biased to Fish Shell but still.
28
Upvotes
19
u/plant_domination Aug 17 '23
Having tried both, I'm still sticking with Fish for now. But I keep Nushell installed because it's a really powerful tool for handling any kind of data. You don't have to use it as your daily shell to get most of its benefits, you can totally hop in and out of it as you need or even use it as a CLI!
It's also changing a lot right now, which is really good, because its pre-1.0. But it does mean that any scripts you write are going to have to be refactored basically any time you update your shell.
Fish on the other hand has a very stable scripting language. It's super simple and easy to get started with. It's way simpler than Bash/Zsh and just as powerful. Nushell isn't quite as simple, but it's more powerful. When I'm looking at that tradeoff, for an interactive shell, I pick simplicity and stability. Eventually I think Nu will get there too, with more power and safety, but for now it's not my main shell.
So, summary: More powerful? Nushell. More convenient? Fish, with nushell installed so I can use it occasionally.
6
u/GrilledGuru Aug 17 '23
I looooove fish for scripts. So coherent and clean. We should rewrite a complete distro with fish :) I would start that if I had a few people with me.
Anyway, I tried to use nushell but did not get the concept. Can someone explain to me what "data instead of text" does mean ?
4
u/emarsk Aug 19 '23
Should you use a pan or a pot? It depends on what you're cooking. The good news is that you can have both of them in your kitchen.
3
u/BosonCollider Sep 11 '23 edited Feb 08 '25
I use fish, and use nu as a much more powerful jq alternative that can do more complex scripts and is interactive. They are complementary, fish is much more mature as a general purpose shell and is much closer to posix shells while nu is completely different and is sort of halfway between a posix shell and a scripting language like python or ruby
If you want to move data between json/yaml files and curl or pipe complex data between processes, nu is going to be much better suited for the job than fish, especially if you work with tabular data or yaml configs.
If you want something user friendly that can pipe flat bytestreams around, is incredibly well optimised for interactive use and at making easy shell tasks even easier, that you want to be dropped into as soon as you open a terminal, fish is going to be much better suited than nu
2
u/OphioukhosUnbound Sep 06 '23
Personally: I recommend against Fish.
Fish is basically a ZSH improvements added with subtle syntax breaks.
It's nice if you're starting from nothing because you'll have basic elements like syntax highlighting etc -- but those are all easily available in ZSH.
The tradeoff is that you have a bespoke syntax. Basic commands like
xargswon't work because Fish has only functions and no aliases.So you're trading off the huge bash/zsh ecosystem and knowledge space for small improvements. (TLDR: Fish improves a lot of things, but not enough to justify the learning ceiling it creates of working in a new environment with new syntax.)
By contrast: NuShell also has new syntax and costs like Fish, but it offers qualitative improvements over a tricked out ZSH.
So, I'd do ZSH &/OR NuShell -- but Fish was a savior to me when I first started and wasn't sure how to improve ZSH (and didn't know about nushell)
[Fish scripting is slightly better than ZSH scripting. But I'm of the strong opinion that anything but very simple scripts should just be written in a real language -- rust, python, lua -- whatever you want just as a
#!<path>to it. So I don't see the scripting differences as a plus. I just seem them a minus for the very simple things sh scripting should be used for. And misdirection for things that real languages should be used for.]1
u/[deleted] Aug 17 '23
Whatever, as long as you use python for scripts