问题
I have tried the following
at the end of my .screenrc
conda activate ${CONDA_DEFAULT_ENV}
in my bash terminal, I typed:
conda activate atwork3
echo ${CONDA_DEFAULT_ENV}
> atwork3
screen -S test
> # starts screen OK but comes with env base
echo ${CONDA_DEFAULT_ENV}
> base
I read that you cannot put bad commands in the .screenrc or the full file gets ignored which is probably what happens to me here
I also tried things from how-to-open-tabs-windows-in-gnu-screen-execute-commands-within-each-one but did not yet get the real stuff behind these comments and how to specify a command in .screenrc or at screen call (examples are weird to me)
Anyone could please give an example on how to change env while entering screen to keep the conda env of the mother bash terminal! (also in subscreens!)
来源:https://stackoverflow.com/questions/57705407/keep-the-same-conda-env-after-entering-screen