I run Centos 7, and I installed devtoolset-8 in order to get gcc 8.
Here I found how to enable it for bash, which is done simply by adding
source scl_source enable devtoolset-8
to .bashrc.
If I append this to the .zshrc, or run that command from within zsh, I get
/usr/bin/scl_source:58: = not found
It seems that in scl-utils there is no zsh support (see this discussion).
Is there a way of enabling devtoolset-8 it for zsh?
Currently, I set the gnome terminal emulator to run zsh instead of the shell (bash), so I thought that the correct version of devtools would be inherited by zsh, but it's not the case.
As I open the terminal, % gcc --version (in zsh) gives
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)
Copyright (C) 2015 Free Software Foundation, Inc.
...
but if I first run bash, then $ gcc --version gives what's expected,
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 Free Software Foundation, Inc.
...
Apparently, I don't understand what gnome-terminal is actually doing when I have it run zsh instead of the bash shell.
What am I not understanding?
A work-around that I found is to set
gnome-terminalto runas a custom command in place of the default shell, which is equivalent to opening a terminal emulator with
adapted from here.