Don’t try to out-nerd me, your shebang advice isn’t even POSIX compliant ! Use #!/usr/bin/env sh, there are systems (incl. NixOS) where there is no /bin/sh
And Fish’s scripting language leaks into the interactive shell. Setting variables via export a=b doesn’t work, for example. I don’t like that.
Yes, it’s true that #!/usr/bin/env bash is a more reliable way to get bash, but you mentioned that you wanted a POSIX shell, not that you specifically needed bash, so #!/bin/sh will work on any system including NixOS.
Also, export a=bdoes work in Fish. But you don’t have to use it if you don’t know how it works.
Don’t try to out-nerd me, your shebang advice isn’t even POSIX compliant ! Use
#!/usr/bin/env sh, there are systems (incl. NixOS) where there is no/bin/shAnd Fish’s scripting language leaks into the interactive shell. Setting variables via
export a=bdoesn’t work, for example. I don’t like that.Actually,
/bin/shis available on NixOS 🤓Yes, it’s true that
#!/usr/bin/env bashis a more reliable way to get bash, but you mentioned that you wanted a POSIX shell, not that you specifically needed bash, so#!/bin/shwill work on any system including NixOS.Also,
export a=bdoes work in Fish. But you don’t have to use it if you don’t know how it works.