New favorite tool 😍

  • jack@monero.town
    link
    fedilink
    arrow-up
    4
    arrow-down
    12
    ·
    edit-2
    6 months ago

    There is no sh shell. /bin/sh is just a symlink to bash or dash or zsh etc.

    But yes, the question is valid why it compiles specifically to bash and not something posix-compliant

      • jack@monero.town
        link
        fedilink
        arrow-up
        2
        arrow-down
        2
        ·
        edit-2
        6 months ago

        Yes, there was the bourne sh on Unix but I don’t see how that’s relevant here. We’re talking about operating systems in use. Please explain the downvotes

        • BatmanAoD@programming.dev
          link
          fedilink
          arrow-up
          10
          ·
          6 months ago

          It’s relevant because there are still platforms that don’t have actual Bash (e.g. containers using Busybox).

          sh is not just a symlink: when invoked using the symlink, the target binary must run in POSIX compliant mode. So it’s effectively a sub-dialect.

          Amber compiles to a language, not to a binary. So “why doesn’t it compile to sh” is a perfectly reasonable question, and refers to the POSIX shell dialect, not to the /bin/sh symlink itself.