This package has been serving as experiment to run Pixi-like activation in new shells. I think we can consider it's useful and I'd like to see this integrated in conda natively. It's unlikely we can deprecate conda activate and teach users to use conda spawn or conda shell. Muscle memory is strong, after all.
My plan would be to:
- In unitialized interactive shells,
conda activate runs like python -m conda spawn. This is, activate would create a new shell process with the right ephemeral initialization for that session. deactivate would prompt the user to exit or Ctrl+D. For clarity, this same logic can be made available as an additional subcommand, shell, but this may add more confusion, so maybe leave it out.
- In non-interactive shells (e.g. inside a script), we error out asking users to run the shell hook via
python -m conda shell.bash hook or similar.
- In initialized installations, where
conda is a shell function that forwards to shell subcommands or Python subcommands as needed, things would keep working as always. The shell activate subcommand shadow the spawn-like one implemented in Python.
This package has been serving as experiment to run Pixi-like activation in new shells. I think we can consider it's useful and I'd like to see this integrated in
condanatively. It's unlikely we can deprecateconda activateand teach users to useconda spawnorconda shell. Muscle memory is strong, after all.My plan would be to:
conda activateruns likepython -m conda spawn. This is,activatewould create a new shell process with the right ephemeral initialization for that session.deactivatewould prompt the user toexitor Ctrl+D. For clarity, this same logic can be made available as an additional subcommand,shell, but this may add more confusion, so maybe leave it out.python -m conda shell.bash hookor similar.condais a shell function that forwards to shell subcommands or Python subcommands as needed, things would keep working as always. The shellactivatesubcommand shadow thespawn-like one implemented in Python.