3

I have just installed a new version of Conda (22.9.0). My previous version used to prepend the Linux prompt with the name of the activated Conda environment. However the new version replaces the whole prompt with the Conda environment name e.g. (base) . Therefore, I would like to customise the prompt. I have done this using the env_prompt option in the .condarc, however I am struggling to add a space at the end of the prompt.

channels:
  - bioconda
  - conda-forge
  - defaults
auto_activate_base: false
env_prompt: ({default_env}) [\u@\h \W]\$ 

I would like to add a space after the dollar sign but I can't work out how to do this. Help would be appreciated.

Best wishes,

Lucy

Lucy
  • 77
  • 5

1 Answers1

5

Conda 22.9.0 introduced a minor regression resulting in your prompt being incorrectly modified. Running a one-time re-initialization of conda will fix the issue:

conda init bash

After running the above command, you will need to restart your shell for the changes to take effect.

See: https://github.com/conda/conda/issues/11885

Ken Odegard
  • 246
  • 1
  • 4
  • 1
    This solved it after removing the previous conda init part from `~/.bashrc`. For some reason `conda init`didn't modify the faulty init already present. – Shriraj Hegde Oct 05 '22 at 12:23