this post was submitted on 08 Sep 2025
320 points (97.9% liked)

linuxmemes

27326 readers
935 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
    320
    Fish rules (piefedimages.s3.eu-central-003.backblazeb2.com)
     

    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

    top 50 comments
    sorted by: hot top controversial new old
    [–] Marafon@sh.itjust.works 41 points 1 week ago (4 children)

    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 29 points 1 week ago (2 children)

    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 15 points 1 week ago (1 children)

    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.

    [–] somerandomperson@lemmy.dbzer0.com 2 points 1 week ago (3 children)

    No posix compliance is a headache. (Where the hell are my aliases!?) And also most scripts need to be executed in a posix-compliant shell.

    [–] Zozano@aussie.zone 14 points 1 week ago* (last edited 1 week ago) (1 children)

    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.

    [–] joyjoy@lemmy.zip 6 points 1 week ago

    Whatever you do, do not link /bin/sh to /bin/fish.

    [–] dreadbeef@lemmy.dbzer0.com 6 points 1 week ago* (last edited 1 week ago) (3 children)

    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

    load more comments (3 replies)
    [–] woelkchen@lemmy.world 4 points 1 week ago

    And also most scripts need to be executed in a posix-compliant shell.

    That's why there is that shebang thingie in first line. Distributions like Debian use an entire different shell from bash for scripts: https://manpages.debian.org/buster/dash/dash.1.en.html

    [–] interdimensionalmeme@lemmy.ml 5 points 1 week ago (2 children)

    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 4 points 1 week 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.

    [–] somerandomperson@lemmy.dbzer0.com 2 points 1 week ago* (last edited 1 week ago) (5 children)

    Shell configs are hard to move. Some in $HOME/.config , some in .[idk]rc files, etc.

    It's messy. Unless you write everything you modify. If you did not do that up to now...good luck moving shell configs.

    [–] AdamBomb@lemmy.sdf.org 5 points 1 week ago

    What? No they aren’t hard to move. They’re usually just one file. Copy to your new machine and done.

    load more comments (4 replies)
    [–] RmDebArc_5@piefed.zip 14 points 1 week ago (1 children)

    Okay so first there was Unix. It was semi Open Source and a bunch of companies were making different versions that were becoming increasingly incompatible. That is why POSIX was created, it standardizes major parts of Unix. Linux is a Unix like operating system, meaning it functions similarly but doesn’t share any code. One thing that POSIX standardizes is the shell meaning there’s a standard how a loop works etc. Most shell on Linux like bash and zsh are POSIX compliant but some (like fish aren’t). This means a command that works one way in bash might work differently in fish. Basic stuff is mostly the same in my experience so if you’re not having any problems you shouldn’t worry about being POSIX compliant. If you want most of the same stuff but POSIX compliant checkout zsh. Fish provides documentation for adjusting your commands so I’d just ignore it until you run into a problem and then take a look at the docks

    load more comments (1 replies)
    [–] JackbyDev@programming.dev 11 points 1 week ago (1 children)

    "POSIX compliant shells" means shells that work with... Fuck how do I even describe this simplistically? A lot of scripts are ran by a program named "sh". Sometimes it is bash, sometimes dash, but they're all POSIX compliant which means they've got some standard things that most people expect.

    Using a non POSIX compliant shells will be okay, because programs trying to use "sh" will still work (unless you set something up wrong, which you'd probably have to go out if your way to do, so you're probably fine).

    Genuinely the only downside to using a non POSIX compliant shell is that you won't learn the standard stuff so you won't be as good at writing and reading scripts. It's truly not too big of a deal. Fish (non POSIX compliant) is what Arch (or at least Cachy) used by default. It's been great. The defaults are useful. To get a similar experience with POSIX shells I typically have to use zsh with oh-my-zsh and some plugins. Fish does it all out of the box.

    So don't worry about it!

    load more comments (1 replies)
    [–] Nalivai@lemmy.world 5 points 1 week ago (1 children)

    zsh with oh-my-zsh addon can do the same amount of pretty colours and qol stuff, with the addition of being POSIX compliant. Not that fish is bad or anything, but you don't want additional troubles with random incompatibility on top of the usual learning curve.

    [–] Marafon@sh.itjust.works 2 points 1 week ago

    Thanks for the recommendation! I always end up doing things the hard way anyway lol

    [–] avidamoeba@lemmy.ca 17 points 1 week ago

    Feels difficult to breathe. 🀭

    [–] Sidhean@piefed.social 15 points 1 week ago

    POSIX Defiant

    [–] woelkchen@lemmy.world 13 points 1 week ago (2 children)

    I really like Fish but for simple stuff like youtube-dl you always have to put quotation marks around the YouTube video's address because Fish thinks the question mark is an operator. So annoying.

    [–] ahti@lemmy.world 24 points 1 week ago (2 children)
    [–] woelkchen@lemmy.world 10 points 1 week ago (1 children)

    Fixed in fish 4.0 :)

    *reinstalling Fish right now*

    [–] woelkchen@lemmy.world 3 points 1 week ago (1 children)

    reinstalling Fish right now

    Alright:

    > /usr/bin/fish --version
    fish, version 4.0.1
    

    For whatever reason openSUSE doesn't ship 4.0.2 despite the fact that it's in its development repo since months. Oh well, could be worse.

    [–] kilgore_trout@feddit.it 3 points 1 week ago (1 children)

    Ask the maintainer to push the update to Factory.

    [–] woelkchen@lemmy.world 3 points 1 week ago

    Maybe later

    load more comments (1 replies)
    load more comments (1 replies)
    [–] bitwolf@sh.itjust.works 13 points 1 week ago* (last edited 1 week ago) (2 children)
    [–] thevoidzero@lemmy.world 6 points 1 week ago* (last edited 1 week ago) (1 children)

    Then you're just running bash scripts with bash. You're not running bash scripts with fish.

    [–] alecsargent@lemmy.zip 11 points 1 week ago (1 children)

    I think that's the point of the comment

    [–] bitwolf@sh.itjust.works 8 points 1 week ago* (last edited 1 week ago) (1 children)

    Exactly, use the shell you like (nushell in my case), write POSIX scripts for maintainability, and use shebangs so you don't have to think about it.

    If you like fish but don't use it as your login shell because it's not POSIX you're missing the point of the shebang

    Write POSIX scripts for portability*, maintainability doesn't depend much on the shell

    POSIX for the system, Fish for the interaction is how I like my OS :3

    [–] fnrir@lemmy.blahaj.zone 6 points 1 week ago
    #!/usr/bin/env bash
    
    [–] notarobot@lemmy.zip 9 points 1 week ago* (last edited 1 week ago) (2 children)

    Non English speaker here . don't you mean "non POSIX compliant" instead of "POSIX non compliant" ?or is it a hint at the fact that it is designed to actually be non compliant?

    [–] Capricorn_Geriatric@lemmy.world 12 points 1 week ago* (last edited 1 week ago) (1 children)

    "non-POSIX compliant" = compliant with non-POSIX (whatever "non-POSIX" may be)

    "POSIX non-compliant" = not compliant with POSIX

    The best way to say what OP did would be a simple "not POSIX compliant". Looking back, that's exactly what was said in the post. The meme itself is, unfortunately a different story.

    Posix non-compliant was used in the meme because the author wanted to save on words in the puchline. "Using a shell not POSIX compliant" lacks a few words and is syntactically incorrect. "Using a POSIX non-compliant shell" saves on words, and is syntactically correct, but makes the sentence more complex.

    All in all, the "non-" prefix is a bit finicky in english and can usually be avoided.

    [–] four@lemmy.zip 16 points 1 week ago (2 children)

    Wouldn't it be more like "non POSIX-compliant"? That's how I would understand it, though I'm not a native speaker

    Honestly, I didn't see it that way. With the dash, I do. That works as well. It's just that, if I put a dash somewhere myself, it's the other way around.

    [–] eager_eagle@lemmy.world 3 points 1 week ago

    This is the way I see it too. Treat "POSIX-compliant" as an adjective and negate it.

    [–] Sidhean@piefed.social 8 points 1 week ago

    Generally, people mix the two, so you have to use context. I think, however, your take is correct. I think the post is meant to give a bit of a rebellious vibe, so that may be why they chose this phrasing.

    [–] acockworkorange@mander.xyz 6 points 1 week ago (1 children)

    POSIX shell sucks ass. Just because there are many worse options doesn't make it any better.

    [–] joyjoy@lemmy.zip 5 points 1 week ago

    I love my bash-isms.

    [–] hellfire103@lemmy.ca 6 points 1 week ago (1 children)
    [–] Jankatarch@lemmy.world 2 points 1 week ago

    Chaotic lawful.

    Laughs in still needing to write POSIX scripts

    source, I use debian with fish and I write my scripts still in POSIX since fish is god slow at scripting, it is really nice for interactive usage but scripting performace is bad, and I can't assume bash to be everywhere so POSIX I go

    [–] dreugeworst@lemmy.ml 5 points 1 week ago (1 children)

    using nushell is my little rebellion against POSIX tyranny

    load more comments (1 replies)

    I'm sorry I can't hear you over my eshell

    [–] Gonzako@lemmy.world 3 points 1 week ago (1 children)

    It's installed on my machine but really don't know how to make use of it that much. Any tips and tricksters?

    [–] Kurallier@programming.dev 6 points 1 week ago* (last edited 1 week ago) (1 children)

    While using the fish shell you can just type 'help', and it'll pull up an offline web page with their manuals and guides. But to be honest, I dont really use fish for anything but the fancy colors and auto-completion lol. Also fish 🐟 :)

    [–] Gonzako@lemmy.world 4 points 1 week ago

    oh yeah! the autocompletion seems great

    [–] CubitOom@infosec.pub 2 points 1 week ago (1 children)
    [–] Gonzako@lemmy.world 2 points 1 week ago

    I'd rather use cash

    load more comments
    view more: next β€Ί