Reintegrate with `conda activate`
- Dominant language
- Python
- Stars
- 6
- Forks
- 4
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 13
Description
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.
Contributor guide
Research direction
Start by reading the existing behavior around `conda activate`, `python -m conda spawn`, and the `python -m conda shell.bash hook` entry point. Define how initialized and uninitialized interactive shells should differ, how non-interactive shells should fail, and how `deactivate` should behave; done requires an agreed design and corresponding implementation across supported shells.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100