> Either Ubuntu's zsh package should do the same (or something similar), or Ubuntu must put important environment variable stuff somewhere else and have only bash-specific stuff in /etc/profile and /etc/profile.d.
Whilst I sympathise with the OP - I've used ZSH as my $SHELL for a number of years in the past - I *do* object to the former - /etc/profile *must* be POSIX/Bourne shell compliant[0].
The latter - files under /etc/profile.d - *should* be POSIX/Bourne shell compliant, IMVHO.
Either way, all of the files *can* be made POSIX-compliant and have something along the lines of:
test $SHELL = /bin/bash && {
... Bash-specific stuff here
...
}
after the POSIX-only setup.
ZSH can obviously source the then-made-POSIX-compliant options from /etc/zshenv or /etc/zprofile[1] (or wherever they live nowadays).
This obviously only concerns the environment variables, settings, etc. which are required to have the same functionality in terms of the operating system, in a way which is $SHELL-agnostic. We're not talking about options which only concern Bash or Zsh users, i.e. auto-completion, etc.
> Either Ubuntu's zsh package should do the same (or something similar), or Ubuntu must put important environment variable stuff somewhere else and have only bash-specific stuff in /etc/profile and /etc/profile.d.
Whilst I sympathise with the OP - I've used ZSH as my $SHELL for a number of years in the past - I *do* object to the former - /etc/profile *must* be POSIX/Bourne shell compliant[0].
The latter - files under /etc/profile.d - *should* be POSIX/Bourne shell compliant, IMVHO.
Either way, all of the files *can* be made POSIX-compliant and have something along the lines of:
test $SHELL = /bin/bash && {
Bash-specific stuff here
...
...
}
after the POSIX-only setup.
ZSH can obviously source the then-made- POSIX-compliant options from /etc/zshenv or /etc/zprofile[1] (or wherever they live nowadays).
This obviously only concerns the environment variables, settings, etc. which are required to have the same functionality in terms of the operating system, in a way which is $SHELL-agnostic. We're not talking about options which only concern Bash or Zsh users, i.e. auto-completion, etc.
[0] https:/ /manpages. debian. org/unstable/ dash/sh. 1.en.html# FILES /shreevatsa. wordpress. com/2008/ 03/30/zshbash- startup- files-loading- order-bashrc- zshrc-etc/
[1] https:/
My £0.02