Re:Shell Productivity Tips and Tricks
by ASTP001 on Saturday April 25, 2020 @11:13AM
(#22978709)
I really enjoyed using fish for a short while, but soon I learned that it was not POSIX compliant. This was a deal breaker for me since my colleagues would often share scripts that wouldn't just work for me. I use zsh nowadays.
[ Parent
| on HN ]
I love zsh, but it isn't without its own strange quirks that make compatibility exciting at times. In a thread from a fortnight ago¹, RANDOM is handled very differently for example. Try `echo $(echo $RANDOM) $(echo $RANDOM)` in zsh and bash.
I'm unsure whether minor differences that catch you out occasionally are worse than huge differences that you always have to think about. For me zsh still wins ;)
Wow! Even repeating that call always yields the same result in zsh - as long as it's a subshell.
I think your comment will save my sorry ass one day.
Well, you could always just use a shebang or call bash/sh directly on the file.
Without the same fluency in bashism from using it for day-to-day activities, the colleague provided script is less readable and less editable for the fish-fluent, bash-inarticulate. Any fish-specific scripts are also of low-value to colleagues.
It's not that it's impossible to be a shell polyglot, but GP deemed it easier to learn !fish.