using friend’s computer
open terminal
it’s actually windows
Search for whatever passes for a terminal in microslop machine
Top result is Terminal from 2018
As far as I can tell it is some kind of action thriller movie?
0/10 garbage experience
Movie was terrible also
It’s actually windows
It’s actually not Unix-like.
C:\WINDOWS\system32>echo $0 $0 C:\WINDOWS\system32>In Powershell, it exits with no output
Kind reminder that powershell has OOP.
I spent 5 minutes reading this and the further I get the more I hate it
A 4chaner has friends? Fake nerd copium.
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.
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.
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
zsh > bash
Brave stand, I will stand side by side with you until the first signs of mild resistance or mockery from the world!
Well guess what?
#include <string.h> #include <iostream> int main (int argc, char *argv[]) { const int which = strcmp ("zsh", "bash"); std::cout << which << std::endl; return 0; }Output
1
I have never really ever used bash and thought, "Man, I wish my shell was better . . . ". Using ctrl+r to recall past commands, using sudo !! to fix missing permissions and writing small bash scripts all work very well.
That being said, if you use anything else, and you like it, I’m happy for you, but I do wonder, what leads people to other shells? What problems do they have with bash?
To me, it genuinely makes a huge difference that I don’t have to manually press Ctrl+R for history search. Because 9 times out of 10, I accept a history suggestion from Fish where I did not think about whether it would be in my history.
This includes really mundane commands, like
cd some/deeply/nested/path/. You would not believe, how often I want tocdinto the same directory.
But I’ve also had it where I started typing a complicateddocker runcommand and Fish suggests the exact command I want to write, because apparently I already ran that exact command months ago and simply forgot.I used bash for 20 years and, while I obviously knew that there were alternatives, it never seemed necessary to switch. Tried fish on a whim a few months ago and I will never go back.
Do you know if fish can input arguments from prevous commands like
ESC + .does in bash?Alt + UpArrow by default
Do you know if fish can input arguments from prevous commands like ESC + . does in bash?
Like Alt-.? (/ Alt - > ).
Easier in reach, and can cycle through.
I’ve not got that in my muscle memory yet… so rarely used… had to look that up. Handy. Should use more.
Yes exactly. I couldn’t find it on the fish online docs. Alt-. apparently also work in bash, so i should just not use the ESC version. I use it a lot for renaming and moving files. Thanks.
Hrm. Couldn’t find it on the fish online docs, ey? Worth a mention to https://github.com/fish-shell/fish-shell/issues ?
Yep, and fish has even more ways to expedite frequent used commands and locations, but because the completion stuff’s so good, it’s easy to never bother setting up abbreviations and keybinds and so on. So many things are often just a couple key presses away, by default, after using it for a while.
alias fuck='sudo !!'is probably the best thing I’ve ever added to my profileThere’s also this
The heavy-handedness of that absolutely terrifies me, but at least it asks for confirmation first.
I switched to zsh at a time where completion for commands parameters except file paths in bash wasn’t really a thing, you could add some with a script, but they didn’t work well. I’m sure the situation has improved by now, but someone told me recently, there are still no descriptions for the completions. I find it very helpful and it saves me opening a man page a lot of times. For example, typing
grep -<Tab>gives me this:
And now I’m so used to many little features (mostly around the syntax) that wouldn’t be a reason to switch on their own, that I find bash cumbersome to use.
i use bash but i also use atuin which makes shell history so much neater. that’s about the only convenience i need in a terminal shell.
I script everything in bash, but for everyday use
fishjust has some modern QoL things that make it easier to get around. For me, specifically, it’s the way you can recall commands by seeing a ghost version of your history, as you type. You can even scroll through a filtered history if you’re part-way through typing some long command that matches what you have typed.Another neat thing, it does it’s best to predict what I want to type and remembers common locations, showing them as ghost text as well.
Try fish for a week, use the online help to familiarise with the completion stuff… see if you still find bash adequate.
Me hitting tab on any shell that isn’t fish
“What the hell was that I ran the other day?”
start typing, ctrl+right, up, up, up, up, up, up
“Gotcha, bastard!”
right, enter
🦀
What specifically do you dislike about zsh?
tbh it’s fine and i use it a lot more than bash.
It’s the index on 1 that ruins it for me.
Edit: come to think of it what would zsh print out for echo $0?It follows the same convention as most programming languages that expose the argument list. Python’s
sys.argvhas the program name at index 0 and the first argument at index 1. C’schar **argvdoes the same: index 0 is the program name, index 1 is the first argument. So it stands to reason that Zsh’s$0should be the program name and$1should be the first argument……which, by the way, is exactly what Bash does as well.
I never tried anything other than bash tbh. Not sure if i should. I never really looked into what i might be missing out on with a different shell. Bash just works so i never felt like messing around with it.
fish is worth trying. saves alot of typing
So true.
Save the RSI spoons for the real work. Don’t waste them on the shell. Get more done, with less pain, less effort, faster.
If you ever used ubuntu, then you’ve used dash
I thought the default interactive shell is still bash on Ubuntu, dash is only used for /bin/sh, isn’t it? At least bash is also installed by default, as there are so many scripts that wouldn’t run otherwise
Hmm, i didn’t know ubuntu was using a different shell. I’ve used it a few times in a vm. Other than that i installed it on my laptop once like 15 years ago lol.
I literally do not notice any difference. If the folders and such get the pretty colors and tab works, I could give a damn.
I don’t mind /bin/zsh.
Now Oh My Zsh! on the other hand can die in a hole.
Linux noob here. Can you explain please why I‘d use a different terminal than what my distro provides (bash)?
I would really recommend you try fish.
It has a lot of nice autocomplete features and handles functions much better than bash. It has a very sensible autoconfig so you can just install and try it.
Zsh can be configured in quite a lot of ways. It’s default config is quite similar to bash.
What does it autocomplete? Filenames? Bash can do that too, right? I just hit the tab key and it’s written there.
And with functions you mean in scripts? How does it handle functions better?
Autocompletions in fish also take history into account, which saves you a lot of typing in the long run.
Fish shell script is much more sensibly constructed than bash so it’s just much easier to write a script in fish.
Thank you for explaining
Fish was amazing when I first discovered it, but I found it had too many problems for me to effectively use it. Having to adapt existing bash/zsh scripts was a major problem for me.
So I went the other way around and managed to get all of the Fish features I wanted working under zsh using atuin, starship, and other misc. oh-my-zsh plugins to fill the gaps.
Best part: I used a git-controlled home-manager setup to do it so I can activate my entire environment on a fresh machine/server in minutes after I clone it.
Why bother adapting existing scripts?
They’re happy running as they are in bash/zsh.
They were mine. People rice their DEs, which I don’t care much about tbh… but I rice my shell even more obsessively.
Features and default settings, but its really just about preference. They are all good at what they do.
Also im only saying this because it confused me for so long, but shell and terminal are different parts of the same thing. Bash is your shell, its the backend that runs everything you type into your terminal. My computer for example uses my kitty terminal which communicates in bash. You can change both the shell and terminal. Zsh is another shell, so it would change the “shell language” you use to communicate with your terminal.
There can be a ton of reasons, albeit I personally also just stick with default (for me zsh). In typical linux user fashion I also must tell you that bash and zsh are shells, not terminals.
The two main reasons you’d choose a particular shell is because you prefer it’s configurability or syntax. Zsh has a bunch of features that you can enable and you can configure it to behave basically however you want, like adding spelling correction or multiline editing, but it’s defaults absolutely suck unless your distro comes with a sensible config. Fish, which another guy here’s raved about, goes in basically the opposite direction and is really nice to use out of the box (I haven’t used it though). I hear it’s technically not a valid
/bin/shsubstitute like zsh or bash because of syntactic differences, but that’d be a whole other rabbit hole if true.One other reason can be performance concerns because bash is pretty slow when treated as a programming language, but I’d argue you shouldn’t organize your workflow so that bash is a performance bottleneck.
I use whatever my OS came with.
Usually I just use bash it’s definitely good enough. I’ve tried zsh and fish, I definitely prefer fish
I hear ZSH can be made as nice as fish (or near enough (~?)), but I’ve just never bothered since fish is nice straight out of the box.
I’m not tring that on my machine. What does it does?
Prints out what shell you’re using. Bash is default for most Linux distros. MacOS switched from bash to zsh as their default. Zsh is hella customizable, by default it functions more or less like bash.
Fish is cool, has neat quality of life features out of the box, but can also break scripts sometimes.
For me it does not seem to print anything

I’m using fish, which is great :)Thank you. TIL.
Good scripts don’t break in other shells, they use a shebang
Nushell is very cozy for me. I work with SQL all day so I ended with PTSD and having my terminal syntax cosplay as it is nice.


















