• arcine@jlai.lu
    link
    fedilink
    arrow-up
    8
    arrow-down
    2
    ·
    edit-2
    5 days ago

    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 )

    • trevor (he/they)@lemmy.blahaj.zone
      link
      fedilink
      English
      arrow-up
      14
      ·
      7 days ago

      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.

      • arcine@jlai.lu
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        5 days ago

        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.

        • trevor (he/they)@lemmy.blahaj.zone
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 days 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.

      • tyler@programming.dev
        link
        fedilink
        arrow-up
        1
        arrow-down
        1
        ·
        7 days ago

        even if it was… you can just run bash or /bin/sh and then run the script there. It’s not you can’t shell into a different shell to run a script. you lose nothing.

    • Laser@feddit.org
      link
      fedilink
      arrow-up
      16
      ·
      7 days ago

      Not being POSIX is one of its main selling points. If you want POSIX, you’re not the target audience