Skip to content

Reintegrate with conda activate #20

Description

@jaimergp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions