you are viewing a single comment's thread
view the rest of the comments
[–] 5 points 4 months ago* (last edited 4 months ago) (4 children)

I used to use fish but I don't like their weird scripting language. I want my shell to be POSIX compliant.

( yes, even my interactive shell )

  • source
  • hideshow 4 child comments
  • [–] 14 points 4 months ago* (3 children)

    Basically every non-Windows system comes with a POSIX-compliant shell at /bin/sh. If you're using shebangs in your POSIX shell scripts like you should, using Fish as your Friendly Interactive Shell shouldn't be a problem.

  • source
  • parent
  • hideshow 3 child comments
  • [–] 0 points 4 months ago (1 child)

    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.

  • source
  • parent
  • hideshow 1 child comment
  • [–] 2 points 4 months ago*

    Actually, /bin/sh is available on NixOS 🤓

    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=b does work in Fish. But you don't have to use it if you don't know how it works.

  • source
  • parent