fish, the friendly interactive shell, is a commandline shell intended to be interactive and user-friendly.

fish is intentionally not fully POSIX compliant, it aims at addressing POSIX inconsistencies (as perceived by the creators) with a simplified or a different syntax. This means that even simple POSIX compliant scripts may require some significant adaptation or even full rewriting to run with fish.

Source

  • Marafon@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    25 days ago

    I just switched to fish for the pretty colors and quality of life features. Anything I should keep in mind while using it as a Linux noob? I don’t even know who POSIX is lol.

    • somerandomperson@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      1
      ·
      25 days ago

      I HIGHLY recommend using bash and zsh as posix-compliant shells at the beginning, then if you want something different; you can use whatever the hell you want. Nushell, fish, etc.

      • woelkchen@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        25 days ago

        I HIGHLY recommend using bash and zsh as posix-compliant shells at the beginning

        Why? All the usual shell scripts don’t use Fish as interpreter.

          • Zozano@aussie.zone
            link
            fedilink
            English
            arrow-up
            2
            ·
            24 days ago

            Most scripts need to be executed in a posix-compliant shell

            Simple. Just add #!/bin/bash to the start of your script and call it a day.

            Or use #!/usr/bin/env bash if you’re goated with the sauce. This won’t work if you’re not goated with the sauce.

            Those who are goated with the sauce know what’s up.

          • dreadbeef@lemmy.dbzer0.com
            link
            fedilink
            English
            arrow-up
            1
            ·
            24 days ago

            why use aliases (they exist in fish) when you can use abbreviations and your history isnt determined by whatever you set your aliases up as? If you change an alias, your history does not reflect that. If you use abbreviations, your history is perfectly usable

      • interdimensionalmeme@lemmy.ml
        link
        fedilink
        arrow-up
        0
        ·
        25 days ago

        WIll I be able to take my shell with on to every other computer I meet ? I mean, these things are tiny, but how portable are shells ? I don’t want to learn a bunch of useful custom commands and then become frustrated to do anything on every computer other than mine.

        That’s why I have a qwerty keyboard, I don’t want to become useless whenever I have to use a keyboard that isn’t my keyboard…

        • Ephera@lemmy.ml
          link
          fedilink
          English
          arrow-up
          1
          ·
          24 days ago

          Fish is not the worst in this regard, because:

          • The defaults are pretty good, so you don’t typically need a config file for it to be usable.
          • As of version 4.0, Fish is (experimentally) available as a single executable for download from their GitHub page. So, even on hosts where you can’t install anything, you may still be able to copy that executable file onto there and use it.

          But there may still be situations where it’s annoying, like if you’re working in a container, then you likely don’t want to mount your fish executable every time.

          But I also have to say I don’t find it too big of a deal.
          I still use Bash for scripting (just throw a #!/bin/sh or #!/bin/bash at the top of your script, like you should anyways), and then for interactive use, not that much of the shell syntax comes into play anyways.
          And if I ever do need to copy a complex Bash command into an interactive shell, I can just run bash, then run the command in there and then exit back out.