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.
Fish was kinda cool when I tried it, but I don’t really care about the benefits that much. I love Zsh’s effortless customization with Oh My Zsh and the POSIX compatibility.
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
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.
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.
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.
Thank you for explaining
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.
Oh yay, more tribalism.
I am a pureblood and do all the computing I need in my head.
Real sysadmins use butterflies.
Yay? Everybody knows you should use paru! /s
lmfao beautifully executed
bait used to be believable
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
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.
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
Fish is for people who like it when sometimes scripts don’t work
I like to gamble what can i say
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 :)
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
🦀
I don’t mind /bin/zsh.
Now Oh My Zsh! on the other hand can die in a hole.
Zsh? That’s a command shell I have not heard of for a very long time.
Check the date on his computer, is it also set to something in the 1980s?
What about ksh?
This is bait.
And I’m ready to
fishI jumped from bash to fish because cachy os has it as default. I kinda don’t like it, it’s a little too fancy, but it’s not bad enough for me to bother switching the default to bash. So I’m using it. Still not quite liking it but maybe it’s growing on me.
what’s fish got? I’m liking zsh here but am always open to a distraction instead of getting work done. :)
Lovely OOTB defaults. I basically change nothing except the theme.
Autocomplete, git context, etc. The QOL stuff you’d expect.
oh interesting. will give it a shot. basically sounds like zsh plus omz?
Yup, very similar! And quite customizable as well if you want to. But the focus is on having, by default, a friendly interactive shell.
I like that I can spin up a VM, install fish,
chshand I’m all set.The main differentiator of fish over everything else is it prioritizes intuitive behavior over backwards compatibility.
Zsh is to bash as c++ is to c. Most bash scripts and habits will work in zsh, but zsh is just more convenient and has more options. Fish is intentionally different.
Do I wish fish had existed instead of bash so we had a nicer terminal experience? On the whole, yes. But I also couldn’t be bothered to learn another shell where most of the instructions online won’t be able to help you, and I ended up sticking with zsh.
Be aware that fish isn’t a POSIX-compatible shell enough, so you have to adjust syntax.
That isn’t incorrect, but it’s not as important as people make it out to be. Linux isn’t certified as POSIX-conformant either.
People are way too stuck on POSIX regarding Fish specifically, but in shell scripting, POSIX compliance boils down to “can it run a pure
shscript”. Bash is compliant. Zsh is partially compliant and needs to set an option to emulatesh. Fish uses a different syntax and is not compliant; if that is a problem, don’t executeshscripts in Fish.POSIX compliance for shell scripts was important in the 80s and 90s when the
#!directive wasn’t as commonly implemented and every script might be executed by the user’s$SHELLinstead. That is no longer the case as virtually every Unix-like system’s program loader supports#!.I use fish, but sometimes it acts weird. And lots of “just copy and past this command” kind of online solutions I have to put into bash.
My main irk is when I want to forward a ‘*’ to a program but have to escape it.
That’s why it’s a shell for the 90s and not the 80s
It’s a cool shell, I use it as a daily driver (though I’m keeping a close eye on elvish which syntactically is even further away from classic shell), but the comments read like fish is basically zsh. And while zsh is pretty close to bash, fish isn’t.
This is a good way of putting it. It’s essentially ZSH with Autosuggest/complete and a theming agent. At least visual-wise.
When you get into the scripting and the hot keys aspect of it, they reinvent the wheel and everything is different., Like for example ,!! and other bangs(I think that’s the right word?) like that are not valid on fish, And everything to do with variables is different from adding to your path to setting variables to creating functions. Also checking your error code is going to be different as well as it doesn’t follow the $x style inputs and doesn’t support IFS and globbing works differently.
TLDR; fish is nice, but If you use it unless you want to relearn an entire type of language, keep your scripts on bash or zsh
or if you wanna see the bigger differences fish has a dedicated bash transition page
thanks for the detail!!
I never managed to learn bash’s ways in my first decade of using it, learning fish a decade ago was easy by comparison. So much more human readable and sensible and consistent. Even though fish is the friendly interactive shell, I now use it for all my scripting too.
That was the exact opposite with fish. I had already gotten fairly well first with bash by the time I started using it, and the way fish did it was just super counterintuitive to me.
I couldn’t get into the overall design of how it looked and I disliked how command substitution and the built in’s worked, Combined with the fact that it’s a lesser used shell, so there’s less information available on it. I just couldn’t do it.
You brought up a point though. That makes me ask. You must not have to share your scripts with anyone then, right? Fish has a very small user base in comparison to ZSH and Bash and when I make a script that’s more advanced I tend to want to share it with my friends and having them install a whole new shell just to run a script is just not helpful to me. ZSH is close enough to bash in compatibility that, generally speaking, if I want to share it, I can use zsh And then convert the minor discrepancies. Where with fish I have to redo the entire script.
I don’t know why small user base is considered as meaning I must not have to share my scripts. Is it like an argumentum populum thing? [“If you build it they will come.” ;D]
[I suppose It’s true in a strict interpretation of those words… I don’t have to.]
I think I have several on my git repos. [… I have even written a text editor in fish.]
Free to use for anyone who wants to.
Also, if user base size is a concern, Fish’s user base is growing faster than Bash or ZSH.
Installing another shell seems a trivial matter to run something.
I install far bigger languages for far less all the time.
And conversion [if for some edge case reason you really need to ~ I know not why though] is generally trivial these days… just ask an LLM, if conversion scripts are lacking.
As for the less information about it… the online help’s really rather thorough and accessible.
- https://fishshell.com/docs/current/tutorial.html
- https://fishshell.com/docs/current/index.html
- https://fishshell.com/docs/current/faq.html
- https://fishshell.com/blog/index.html
I don’t know that quantity over quality would help. It didn’t for me and bash.
Unless I missed something, it seems to me that all that remains, is
I disliked
And that’s of course utterly fine. Free software’s defining point zero, the freedom to use software, includes the freedom to not use. Good to have multiple options to further facilitate that first freedom, catering to more variety of tastes.
does fish have fuzzy reverse hostory search?
Looks like that is indeed the default option
Currently using
zshbut I installedfishyesterday to try it out because I’m thinking of switching. All thezshplugins I have are basically just replicating whatfishhas by default anyway and fish might do it better.Plus, look at your name!
Just whatever you do, don’t
ln -s /bin/fish /bin/shWho the fuck would do that 😭
Well a shell script that can only run with Nash should include !# bin bash in the header.
It still gives you basically no advantage compared to just making your terminal emulator launch
fishby default. And well, it does give you the major disadvantage that scripts without shebang will fail.You assume everyone writes shebangs correctly. Also ideally you’d use
I see.
Proceed to write
The other way around, fish was implemented with the most popular zsh plugins in mind.
Six and two threes
I know but I looked at what fish could do and tried to replicate that with zsh plugins
Fish is great if you can’t remember a specific command, or don’t want to type out long filenames/locations, but I dunno if I’d use it as the default.
I just type “fish” in the terminal if I ever run into a situation where I might get some use from it.
I used to do that, until I realized I never had a usecase for plain bash over fish
I have that occasionally when I want to copy a complex bash command from somewhere. But yeah, I can then just run
bash, run the command in there and thenexitback out of there.that’s what bass is for
I’m guessing, you mean this then: https://github.com/edc/bass
But well, I was rather thinking of when it’s using Bash-scripting-syntax to combine multiple commands.
Like, maybe there’s a for-loop in there. You just can’t paste that directly into Fish and have it work. Granted, you should probably put that into a script file, even if you’re using Bash, but yeah, just temporarily launchingbashis also an option.
in my ~/.bashrc
# if interactive, launch fish [[ $- != *i* ]] && return || fishand
alias f='fish'So fish is my default, and if I ever need bash, it’s already there underneath, just a Ctrl-d keybind away to fall back on, and if I want to get back into fish, it’s just a
f& RETURN away.Seems better to have all the convenience of fish up front. All the completion magic. I so rarely have to type much at all.
Why not just set it as the default then?
Can cause issues (with things that expect bash or other nearer POSIX compliant shells as the system shell).
And then I’d lose those other benefits described, like having bash just a keybind away.
[Edit: I could have swore I got that interactive check in bashrc thing from https://fishshell.com/docs/current/faq.html or other documentation on fishshell.com, but, seems not. Can’t find it even in older copies. Not sure where I picked up that idea from then. Plausibly from someone on irc. I was sure I got that as official advice from fish… which I’ve been using and doing that method with since around 2014.]
It’s time for a
nushellMisread it as nutshell
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.
























