The situation when people go on stackoverflow and just grab some shit from the top answer and just copy paste in their console is surprisingly normal. Not me, obviously, but like other people do it all the time.
That’s true, but I definitely use fish as my default shell and when it runs a script without shebang it automatically runs it with bash. Thus I assume that’s the fish default to make your scripts work.
Trying to be more POSIX-compatible by further breaking POSIX spec is an ok choice to make in this case imo, but I think that’s a somewhat important detail to know :)
I tried switching to Nushell but certain things just wouldn’t work so I switched back to zsh. sha512sum wouldn’t work and there’s no native replacement.
Probably. I think it had something to do with how it’s invoked in Nushell. I think it requires typing something different than what I’m used to. I searched it up and couldn’t find an answer and got pissed off and went back to Zsh. I’m not blaming Nushell, it’s just not for me. Nushell does have it’s own binaries for sha256 and md5, but I prefer sha512 even though it literally doesn’t matter for my use case.
Default zsh is just bash, you need to add all the fancy plugins to get it to do cool stuff
fish is for people who don’t want to spend the time setting it all up and to just get a shell that has most of the QoL fetaures builtin.
Fish is for people who like it when sometimes scripts don’t work
Why would sometimes scripts not work? All scripts are executed with bash by default.
No, they are executed according to the shebang on the first line, which is usually bash. If it is missing, it will default to the current shell.
what kind of monster writes a script without a shebang?
The situation when people go on stackoverflow and just grab some shit from the top answer and just copy paste in their console is surprisingly normal. Not me, obviously, but like other people do it all the time.
That’s true, but I definitely use fish as my default shell and when it runs a script without shebang it automatically runs it with bash. Thus I assume that’s the fish default to make your scripts work.
Trying to be more POSIX-compatible by further breaking POSIX spec is an ok choice to make in this case imo, but I think that’s a somewhat important detail to know :)
I like to gamble what can i say
But I’m a compliant little bitch for POSIX daddy
So write all your scripts in POSIX compliant bash and use the proper shebang?
You don’t even need a proper shebang. Scripts without shebang are executed in bash by fish.
Which is also isn’t POSIX compliant I think
I tried switching to Nushell but certain things just wouldn’t work so I switched back to zsh. sha512sum wouldn’t work and there’s no native replacement.
Isn’t sha512sum a regular binary, that should not depend on the shell at all? What does nushell do that something like that can break o.O
Probably. I think it had something to do with how it’s invoked in Nushell. I think it requires typing something different than what I’m used to. I searched it up and couldn’t find an answer and got pissed off and went back to Zsh. I’m not blaming Nushell, it’s just not for me. Nushell does have it’s own binaries for sha256 and md5, but I prefer sha512 even though it literally doesn’t matter for my use case.