[Proposal] Make Bash the default interactive shell again

RATIONALE

  1. The system itself uses bash as its system-wide non-interactive shell ─ bash is part of the LSB standard. Having all user accounts default to zsh is inconsistent with the rest of the system, and especially so because they are two very different shells. bash is a POSIX-compatible successor to the Bourne shell, while zsh is not POSIX-compatible and includes features from both the Bourne shell and the Korn shell, which are themselves mutually incompatible.

  2. It is far easier for the supporting members of the community ─ i.e. us ─ to come up with a bash script or a bash shell function for helping out a user with specific requirements. zsh handles functions very differently and has a very different syntax, which makes it very difficult for us to suggest a bash-based solution, and would compel us to start learning all about zsh, its syntax, and its initialization.

  3. There is no valid reason as to why zsh should be the default interactive shell. The only reason why people like it is for its visual appeal when used with the powerlevel10k theme, which is not only a shallow and technically unsound reason, but which can just as easily be implemented in bash.

  4. The newbies who’ve been asking for zsh to become the default ─ as per its visual appeal ─ themselves generally don’t even know how to use the shell’s functionality, other than copy/pasting some commands ─ actually, the names of executables (like pamac or pacman), rather than actual shell commands ─ which they found on the forum or at some external website. Many of them don’t even know the difference between a shell and a terminal emulator. Therefore, they don’t have any specific need for zsh whatsoever, while we, the helping community members, do have a need for that interactive shell to be bash.


I am attaching a poll to this post. Apart from casting a vote, I would also like to ask that those who agree or disagree with this proposal would explain here on the thread why either choice has their preference. Words say more than statistics. :wink:

  • Make bash the default interactive shell again in all Manjaro editions.
  • Keep zsh as the default interactive shell in all Manjaro editions.
  • Allow the user to select their default interactive shell upon installation, but with the recommendation of bash by reason of getting better support.

0 voters

7 Likes

So far I am seeing four votes, one of which is mine, and I’ve stated my case in the opening post.

But whatever you vote for, it’s not going to tell us anything unless you tell us why you’ve voted for any particular option. So speak up! :thinking:

Let me add my 2 cents then. I voted to return to bash as the standard, for similar reasons you have already stated. It is a frequently available shell, most examples for scripting found online are bash based. It is a well known and understood shell, so that makes the support for new users easier.

Nothing has ever stopped a more experienced user, to make an informed decision to change the shell to something more to his or her liking. I have been looking at zsh and fish, but found nothing that was crying out to me, take me I’m superior to bash.

Admittedly my use case is a fairly bare bones one, and I wouldn’t consider myself an overly refined programmer. But that makes me very similar to the majority of new users. As I said experienced users on linux do whatever they please anyhow.

7 Likes

I think my position has been made clear :wink:

1 Like

I don’t see any advantage having ZSH as default shell (I knew KDE changed to ZSH for Konsole, I didn’t know the login shell changed to ZSH for all edition globally, I though it was only a KDE thing from this edition maintainers. It looks pretty, and it is kinda subjective, besides that I don’t know what benefit it brings, some may say it is “modern”.

I’m all for BASH as default for all edition.

On a side note these polls are generally irrelevant, unfortunately, only the nerds on the forum will answer, vast majority of people will ignore or not see it.

Maybe worth copy pasting whatever you’re referring to?

6 Likes

I was always against zsh as default. I also think our implementation with pkgfile is problematic … zsh isnt exactly posix-compliant … we implement it through things like Konsole profiles instead of login $SHELL, which is weird - but is apparently because zsh breaks things if set there … so I also say if it is not good enough for TTY then it is not good enough for terminal emulator default … etc.

See tangible example of issues:

10 Likes

It’s posted in the #development:packaging section, which sits under the #development section. This is where the Manjaro team discusses such things as what shell to offer as the default interactive shell. :stuck_out_tongue:

I’m not a developer, but I am a moderator, and I do share my technical opinions with the rest of the team. :wink:

1 Like

Shell imcompatibilities create a nightmare environment when trying to figure out what goes wrong on a system.

With a non-standard shell implemented by default, the first thing you will be asked for is ‘what shell?’.

This would then degrade into shell versus shell arguments on the forum.

It would be very divisive for all users, be they old hands or beginning users.

I vote to keep bash as the default interactive shell.

6 Likes

Surprisingly, none of the people who voted in favor of keeping zsh have bothered to explain why they voted that way.

i did notice that as well.

1 Like

Well, macOS also changed to zsh by default and yet they don’t experience much (or any) problems. Of course it’s not a Linux system but they also have some bash scripts here and there and iirc still use bash internally.
All scripts that need to be executed by bash have a corresponding shebang so I don’t find anything incompatible here. It even supports many of bash syntax constructions (aside from complex ones but those should go to scripts which could be picked up by bash again).

Spoiler

(fish is the best shell out there and don’t try to convince me otherwise)

3 Likes

I voted for Bash as the default. If someone wants to change shells they can. I think new users should first learn the basic bash before venturing off to use a different shell. If they want to change, then they can, no one is stopping them.

I use Fish in my Terminals. I do also write script files in Bash with the appropriate shebang telling the computer to use Bash for that script.

On a side note however, if you are helping someone and they have zsh, as long as bash is still on their computer you could tell them to type bash and then enter and they will enter bash at which point you can give them bash commands. Of course it is easier if you just know that the non-technical person you are trying to help has bash as default.

Another note, if there is a group of newer users that want zsh because of how it looks after they use add-ons then they would probably be better off using fish which has most of those like auto-complete and colour coding for valid or invalid commands built in.

And if they do use fish in their terminal it only takes a second to enter bash to run a bash command.

3 Likes

Well, here’s an example. A member was inquiring about a -y command option to pamac as a shorthand for the --no-confirm option. So I wrote a wrapper for them, as a bash function. If you run bash and you add this function to ~/.bashrc, then pamac will still behave exactly the same as before, but now with that shorthand option available. :arrow_down:

pamac ()
{
  case $1 in
     "install" | "reinstall" | "remove" )
         if [ "$2" == "-y" ]
         then 
             action="$1 --no-confirm"
             shift 2
         fi
         ;;
  esac
  /usr/bin/pamac "${action}" "$@"
  [[ "${action}" ]] && unset action
}
export pamac

Now how are you going to implement that if zsh is the default interactive shell? zsh doesn’t accept any functions inside its ~/.zshrc, and the code would also not be compatible with zsh's own syntax.

2 Likes

@Aragorn , this only means that whatever shells and interpreters installed in your system, you can use the shebang system to make a script as an executable, being abstracted on which shell or interpreter the script is based on. It has nothing to do on why one shell is more superior than the other.

I believe what you have in your mind is that bash has superior environment model than zsh and also being one of POSIX tools. I never use zsh, so I don’t know its shell model compared to bash. The only reason I still vote for bash as the default shell is because it’s a requirement for a POSIX compliant OS. I never like bash syntax, it’s awkward for me. IMO, bash only saving grace is because it’s the only shell (sh compatible) approved in POSIX / SuS.

I would like to see you try that on the code I pasted higher up. You can’t, because it’s a function in the environment.

The best you can do is write a shell script that gets executed as a wrapper for pamac if you have it in a directory that precedes /usr/bin in the ${PATH}. If not, then you have to change its name. And the code would be different too.

1 Like

Yes, that’s what I meant by bash has superior environment model than zsh.

To be honest this thing should be addressed to Pamac development rather than making homebrew solutions that could break in future and user will forget that this function is in their .bashrc.

I would really advice against making any .bashrc (or any *rc) changes for non-advanced users.

But again it’s IMO so go ahead and ask GNOME guys about their opinion. I added it to KDE for the sake of consistency and use neither zsh nor bash.

That was not the intent of the code. It was intended for use by one forum member only, in reply to a concrete question. It’s not meant to go in other people’s ~/.bashrc ─ unless they would choose to put it there themselves ─ nor as a feature request for the development of pamac.

I only posted that as an example of how we cannot suggest workable solutions to members’ problems or questions here at the forum by way of bash if zsh is the default shell. And everything I wrote about zsh being the default simply because it is preferred by the newbies on the basis of its shiny factor still stands.

2 Likes

I agree with @Aragorn , I say it’s still better to stick with bash shell, because it’s a POSIX-compliant shell and the shell model seems better than zsh.

As for the visual look, that’s more to the issue of the terminal emulator, not the shell. I say maybe pair bash with a visually appealing terminal emulator.

It has nothing to do with the terminal emulator. The zsh theming comes from the powerlevel10k package, and such a package does also exist for bash, albeit that it’s not in the Manjaro repo.