logoalt Hacker News

metaxyesterday at 4:51 AM7 repliesview on HN

Or simply use fish


Replies

dieggsyyesterday at 6:25 AM

Seriously. I do think people should spend enough time with bash or posix sh to be comfortable with it, but I'd recommend everyone at least just try fish. It's a lovely interactive experience out of the box with colors, completions, a great prompt, etc. Plus, the scripting language is quite comfy. Like, somewhere between bash and Python (if you find Python comfy, I guess). At least to me it makes more intuitive sense, once I got over the fact that "it's not bash/zsh."

It's written in Rust, if you care about that sort of thing (I switched before that was a thing). And for simple one-liners, compatibility actually has improved at least a bit (like you can do && now, which wasn't a thing before).

Write your shell-specific helper scripts or personal scripts in fish, write your portable scripts in Python or Bash. Look, I love standards. Sometimes non-standard things make sense though. Sometimes they even make more sense in the right context.

Or maybe you'll hate it. That's fine. People won't know until they try though.

For something newer and even more different, check out nushell. I don't have much experience with it, but a lot of its ideas are enticing.

paulirishyesterday at 5:54 AM

Fish gang represent.

I was a bash => zsh/omz person and had these same complaints. But that was 10 years ago. https://github.com/paulirish/dotfiles/blame/main/fish/config...

The baseline fish experience is just better.

starefossenyesterday at 6:57 AM

Glad to see fish getting some shout outs here. Been using it for over ten years now, and it is super easy to get going on new hosts - it is just one simple install away.

eddd-dddeyesterday at 5:19 AM

+1

Nowadays I just use fish with the out of box installation and it fits all my needs.

lillecarlyesterday at 5:35 AM

Craziest thing: You can still script in bash/zsh even if you use fish but you can't always copy-paste from StackOverflow.

show 1 reply
_ache_yesterday at 5:38 AM

Yeap, each time I need a complex shell script, actually Python is a better chose. I just don't need a POSIX compliant shell

     /usr/bin/time -f "%e seconds" fish -i -c exit
     0.21 seconds
ilvezyesterday at 6:46 AM

I've started to play with the idea more recently to try out fish. No appearant reason.. 10 years in zsh is time enough to get comfortable..