[Proposal] Make Bash the default interactive shell again

There’s a separation between shell and terminal emulator.

Shell only handles how a user interacts with kernel in the form of pure CLI, along with shell script.

Something like copy pasting and theming is part of terminal emulator, not the shell.

You can have a shell running in a very old terminal that has no theming.

But note that it’s possible for a shell implementation to detect its terminal capabilities and make full capability of the terminal with color support. This is what powerlevel10k does for zsh.

Yes, but the theming of the shell and the theming of the terminal emulator are two separate things.

The theming of the terminal emulator defines things like what the default text color is and what the color of the background is.

The theming of the shell with the home icon as you see in zsh comes from the powerlevel10k package. It doesn’t have anything to do with the terminal emulator, although I doubt whether it would work in a tty.

And like I said, a similar package exists for bash, but it’s not in the Manjaro repos.

It’s possible for a shell implementation to detect its terminal capabilities and make full capability of the terminal with color support. This is what powerlevel10k does for zsh; change the configuration setting of its host terminal.

As for tty, no it’s not supported; tty is like old terminal without fancy color support.

In the end, visual appeal is part of terminal. Shell can configure the look of terminal.

If we can have this and change the default shell to bash, this should satisfy both worlds need.

1 Like

It would be better to stick with bash in favor of helping people new to Linux of which there’s been an influx. It’s important that we don’t forget there are literally NEW users… but I agree with:

Having 2 shells as default creates additional complications for troubleshooting, assistance, and learning. It doesn’t follow KISS and encourages frustration, there should be total adoption of one or the other. Imagine being new to Linux and Manjaro then trying to do web searches when you barely grasp the terminal and are struggling and don’t understand how to parse between bash or zsh commands. Sticking with bash as the default makes more sense because as stated above, there are more experienced users, but also… there’s far more quickly searched answers to questions including older info.

There’s nothing stopping experienced users* from switching to zsh.

Personal anecdote: I installed Manjaro on a ‘never used Linux before’ friends desktop right before the swap over and they freaked out about the change thinking they were hacked. The nifty bash command wallpaper suddenly wasn’t helpful. Trying to explain differences or why a certain command they googled works or doesn’t takes time they could have been using their system and learning instead of frustrated.

1 Like

Well a little research and testing gave me this:

mkdir -pv ~/.zsh_function/
echo "$(cat <<EOF
pamac ()
{
  case \$1 in
     "install" | "reinstall" | "remove" )
         if [ "\$2" == "-y" ]
         then 
             action="\$1 --no-confirm"
             shift 2
         fi
         ;;
  esac
  command pamac "\${action}" "\$@"
  [[ "\${action}" ]] && unset action
}
pamac "\$@"
EOF
)" >  ~/.zsh_function/pamac
echo "FPATH=\$HOME/.zsh_function:\$FPATH" >> ~/.zshrc
source ~/.zshrc
autoload -Uz pamac

Then it works. Then it can call the function, but doesn’t work. But yeah I see that bash is in that case less complicated and has a smaller complexity layer.

Personally I prefer bash over zsh, because I know how it works. zsh is in many ways different and you have to learn it. I write scripts still in bash, even if my shell is zsh. For me it doesn’t really matter what shell, it should just run bash scripts without a hassle.

4 Likes

No, what I meant is bash and the theme for bash that currently doesn’t exist in Manjaro repository.

And you cannot have 2 default shells per user.

I agreed with you. The rest of the argument I was making was separate from that agreement. What’s the issue?

Edit* Ah, semantics, I see. Perhaps I worded it poorly but it was in reference to [Proposal] Make Bash the default interactive shell again - #6 by cscs

Ok I understand now, I was confused with you saying 2 default shells :frowning:

That’s an error on my side, I didn’t see the “:”.

The thing I don’t like about zsh is the context switch when moving into contaibers or servers that use bash. It’s far more easy to just have bash everywhere so that I don’t need to keep that in mind every time.

Minor inconvenience but still, you asked why we voted a certain way.

1 Like

I have been preferring zsh for years - mainly because of the superior functions offered by various modules - especially git and history search and completion.

The argument of function handling in bash vs zsh is not a superior argument as any scripting should include a #! to tell the shell with interpreter to use.

So - in any support event - which calls for bash specific functionality

#!/usr/bin/env bash
bla(){
    echo "bla"
}

Whether it is one or the other which is default becomes irrelevant.

If I recall correct Arch ISO has switched to use zsh a couple of years ago and as mentioned macOS uses zsh without issues.

9 Likes

I like zsh but I am also aware of the incompatible things. I used bash for a year because of the pkgfile issue. For me, the benefit of zsh is mainly the plugins: zsh-autosuggestions zsh-syntax-highlighting which can tell you whether you are typing the right command and giving you the latest or most common-used command. If there are similar plugins on bash I would use bash.

IMO: the incompatible things are not token by who is default, but any scripts should have a right shebang(like @linux-aarhus says). Of course who is default shell does not affect the ones who will take their favorite shell.

I’m for bash as default for login shell because of POSIX compatibility and bash fits well to TTY that does not support zsh powerlevel10k theme. That’s simple reason.

Zsh/Fish lovers can use Zsh/Fish in their profile of terminal GUI, not login shell. :slightly_smiling_face:

1 Like

I voted for bash

  • it is universal, causes less problems, POSIX-compliant
  • for those who like the fancy-shmanzy, there is this
  • power-users are able to switch to fish or zsh, but can newbies do the other way around ?
  • for the majority of users it is only about visuals and theming, but functionality is more important (why does breath comes in my mind ?)
5 Likes

Vote 4 bash

bash is the designated shell if you’re checking for shell and shell-scripting. it’s too popular to replace it, especially beginners and newbies would be confused if they start with zsh but if you’re a little bit familiar it is no problem using different shells. it is more user-friendly to the common user and there should be no problem for more experienced users to change shells. bash should remain as the golden standard.

2 Likes

Hello, my two cents…

I voted for zsh. Personally for me I use zsh for the vim mode implementation. I don’t use powerlvl10k. I have my own prompt simple and to the point :). I managed to configure zsh by googling and reading, its not that hard and I am no professional nor do I write scripts and what not. Just google and read.
If macOS can use it why not linux :slight_smile:

In response to @Aragorn’s function example, you can write functions in .zshrc. There is no problem.
Here is an example that I wrote for restarting .zshrc whenever you change something in it.
In .zshrc

function reload_zshrc() {
 echo "zshrc reloaded!"
 source $HOME/.zshrc
 zle .accept-line
}
zle -N reload_zshrc

bindkey -M vicmd '^[r' reload_zshrc  # this is for restarting when in vim command mode alt + r

alias rzsh="reload_zshrc"

I also have some functions from zsh_custom_funcs folder, that also accept arguments and work.
Simple example, file name create_and_take_me_to_dir.zsh

function create_and_take_me_to_dir() {
  mkdir -p $1 && cd $1
}

alias cntd='create_and_take_me_to_dir'

With all due respect, I am sure your example can work if you try to make it work.

If zsh was configured when I first installed Manjaro I would have had less trouble configuring it by my self and I would spend less time to google and read.

All this aside I don’t think new users care much about default shell, except those how who are willing to learn and thinker around. The click and enter users, just want flashy and shiny things, so that they can brag around how their system looks :slight_smile:

Cheers…

P.S. At the end of the day, there is no pleasing everyone there’s always someone or something…

1 Like

I switched vote to allow choosing the default shell during installation as I see that it’s the better solution for the 3 worlds (not 2 worlds anymore):

  • Choosing between bash or zsh as the default shell during fresh installation, this won’t start a war between which one should be the default.
  • As long as bash is installed, bash is accessible from the PATH environment variable, and the shebang works properly, almost a full POSIX compliance is still achieved (note that Linux isn’t fully POSIX compliant but almost compliant).
  • bash and zsh fancy theme is installed. Currently, it’s only zsh powerlevel10k , but bash version should be included as well.

MAKE BASH GREAT AGAIN :bangbang::bangbang::bangbang:

Sorry, just couldn’t help myself.

4 Likes

I didn’t read all the posts above so I apologize if this has been proposed already.
How about a Manjaro shell that can support both in it. Then people can have the best of both worlds without have to choose one or the other.
Of course I have no idea how to accomplish this. Just a wild suggestion.
Thanks