Is it time to switch the default shell from bash to fish?

But there has been dialog. Many topics, polls and years of internal dialog within the team. And the dialog is on going. Kde and xfce edition still default to bash, and gnome is testing new things like always.

For whatever reason (timing, etc) thats pretty much news to me.
(II mean ā€¦ we are in this current situation ā€¦ it would be difficult to not accept some amount of history ā€¦ but I wasnt privy to itā€¦ or at least not a comprehensive and productive discussionā€¦ otherwise I would have nothing to say.)

All shell scripts written for bash is calling bash

#!/usr/bin/env bash

or

#!/bin/bash

So it is fairly difficult - if not impossible to break a bash script running it from a zsh shell

And through the couple of years when maintaining the Openbox based editions - I have only heard of one user which actually noted the change.

1 Like

:man_shrugging: Itā€™s the internet, a lot of stuff get lost in the noice. Especially when they happen over a long period of time.

Even if we accept that ā€¦ it doesnt apply to things like ā€˜one-linerā€™ suggestions.

2 Likes

That is true, one-liners are where it actually can happen. But ask yourself:

  • how often do you copy-paste one-liners from the internet?
  • how large a percentage of those would zsh break (my gut feeling is ~0.5%
  • should a new user run one-liners that he doesnā€™t understand? Because it actually has to be a fairly complex one-liner to break with zsh
1 Like

I think I would also go further to suggest the possibility that if ā€œone-linersā€ for bash are being broken ā€¦ then all sorts of other things can happen. IE - ā€œdrop-inā€ it is not.

1 Like

Sure, it is not drop in replacement. Iā€™m not saying it is. Iā€™m just saying itā€™s better :slightly_smiling_face:

Fair(er) position.
My statements are heavily laden with ā€œwhat worksā€ and ā€œwhats understandableā€ and ā€œwhats basicā€ , etc.
I dont believe the nuances are important to newbs.
I do think things not working as expected is a problem they might experience and not understand.

Iā€™m a bit more utilitarian here. Things not working as they expect will happen in inevitably. But it happens less with zsh, because syntax highlighting tells them that it will not work before they run it. I think that the ease of use much outweighs the rare corner case where a oneliner they shouldnā€™t have been running anyway doesnā€™t immediately work.

1 Like

I have a feeling there might be more hidden issues.
But I wont die on this hill ā€¦ I honestly believe it is hampering users. But ā€¦ thats just my opinion I guess.

1 Like

My experience over the years is that the issues are rare and easy to deal with. Can you point out some examples of issues this might cause? (this not a rhetorical question, Iā€™m genuinely interested in your response. If there are compelling or significant reasons to stick to bash, I want to know them, and I value your opinion in general)

Things that Iā€™ve run into:

  • some bspc commands have ā€˜!ā€™ as a part of their arguments. So in zsh I need to escape them or run the command in bash or more likely dash.
  • globbing works differently in zsh than in bash. This is not an issue because because zsh does it better for my purposes
  • arrays start at 1 on zsh. This is silly, but I donā€™t use arrays in interactive use, so it doesnā€™t really matter.

The issues were not difficult to deal with, and they all happened when I was doing things that an average user wouldnā€™t do anyway, let alone a beginner.

Arch uses zsh by default. MacOS uses zsh by default. So we would not be that special for using zsh. We have testing for over 5 years now, so I think it is reasonable to assume that most of the issues would have already been found.

1 Like

It seems you already did a decent job of listing issues.

The expansions and array issues are rather worrying to me.

I think someone who tries harder than me can probably show examples of that destruction.

Otherwise ā€¦ it seems the things have been weighed.

I have also seen confusion among new users of zsh, regarding the usage of quotes or the requirement to escape ā€˜?ā€™ for cases like youtube-dl commands.

The Arch wiki says Bash is the default. Am I missing something here?

Despite all these, I switched to zsh around when Manjaro Gnome switched to it. I have not yet faced any breakages in scripts or commands. And I donā€™t think I can ever go back to bash after getting spoiled with features like auto-completion, syntax-highlighting, fzf integration etc. :wink:

Arch iso uses zsh. The installed system is whatever the user configures it to use. :slightly_smiling_face:

But yes, if you add a user without doing any modifications to config files, arch will default to creating a bash user.

sorry ā€¦ but ā€¦ what? thats even worse.

1 Like

What is even worse than what?

Whether or not zsh is acceptable ā€¦ different shells for different users by default is pretty objectively bad design.

1 Like

So this was meant as a criticism towards Arch iso?

Sure, if thats what they do.