conda takes the directory name as the name of the environment too. This is used for CLI (conda activate xyz) and UX (the (xyz) prompt in the shell). This proposal would add a magic file under conda-meta/ that proposes a name different that the environment directory.
Why is this needed or useful?
conda-build temporary environments could be renamed underneath for better UX (e.g. the name of the package being built)
pixi envs could be rendered as the project name instead of (.pixi/env).
conda-store environments (which are named with hashes to implement atomic updates and rollbacks) could have a user-friendly name.
Environment names could use spaces and other characters that are usually not very path friendly.
The idea would be very simple. If a conda-meta/env-name is present, parse the file contents and use that as the name.
Another useful outcome: changing your conda envs_dirs configuration setting doesn't suddenly cause existing environment prefixes go from named -> unnamed (or vice versa).
conda
takes the directory name as the name of the environment too. This is used for CLI (conda activate xyz
) and UX (the(xyz)
prompt in the shell). This proposal would add a magic file underconda-meta/
that proposes a name different that the environment directory.Why is this needed or useful?
The idea would be very simple. If a
conda-meta/env-name
is present, parse the file contents and use that as the name.