3 ms·
Fish was weird at first, with it's insistence on `or` instead of `||`, and `and` instead of `&&`. Since they relented on this, there's not much non-POSIX weirdn
by cedilla 1y ago
Fish was weird at first, with it's insistence on `or` instead of `||`, and `and` instead of `&&`. Since they relented on this, there's not much non-POSIX weirdness for me. From time to time I'll try to `export` something, but fish just reminds you what to do instead. 3rd party integration is excellent now, too.
When I write scripts I'll just target /bin/sh, or /bin/bash if necessary. Never saw a reason to write zsh or fish scripts.
- maleldil 1y agoNote that `or/||` and `and/&&` are not interchangeable. They have different precedences.
- kstrauser 1y agoExport works now. I write most of my local-use scripts in fish now. Having access to all the little ergonomics like outputting colored text is just more pleasant.
- SAI_Peregrinus 1y agoNote that `/bin/bash` isn't guaranteed to exist, even if Bash is installed. `/usr/bin/env` is guaranteed to exist on POSIX systems, so `/usr/bin/env bash` is the generally recommended way to invoke it in a shebang. `/bin/sh` is guaranteed to exist on a POSIX system, but `/usr/bin/env sh` can be used for consistency.