Remix.run Logo
cedilla 4 days 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.

SAI_Peregrinus 3 days ago | parent | next [-]

Note 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.

kstrauser 3 days ago | parent | prev | next [-]

Export 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.

maleldil 3 days ago | parent | prev [-]

Note that `or/||` and `and/&&` are not interchangeable. They have different precedences.