oh-my-bash icon indicating copy to clipboard operation
oh-my-bash copied to clipboard

Current conda env name is not shown

Open sulsj opened this issue 5 years ago • 8 comments

Hi, I can see virtualenv env name with "font" theme, but I can't see conda env name.

This is virtualenv

03:43:05 sulsj@sjsul-lm-2 ~ → source ~/venv/bin/activate 03:43:11 (venv) sulsj@sjsul-lm-2 ~ →

And this is conda

03:41:16 sulsj@sjsul-lm-2 bin → conda env list # conda environments: # base * /Users/sulsj/miniconda2

03:41:50 sulsj@sjsul-lm-2 bin → conda activate 03:42:01 sulsj@sjsul-lm-2 bin → conda deactivate 03:42:08 sulsj@sjsul-lm-2 bin →

Any fix?

sulsj avatar Dec 04 '19 23:12 sulsj

same question

Alwaysproblem avatar Oct 13 '20 06:10 Alwaysproblem

same question. This feature is necessary.

anyong298 avatar Oct 19 '20 16:10 anyong298

@Alwaysproblem @sulsj FYI, I changed my theme to 'powerline' and it works now. image My OS is Ubuntu 18.04.

anyong298 avatar Oct 19 '20 16:10 anyong298

Thank you @anyong298 , I already add conda venv and python version to the theme tonotdo by calling python_version_prompt from basic.theme.sh

Alwaysproblem avatar Oct 21 '20 06:10 Alwaysproblem

I'm using the default theme (font). It's implemented to show $(virtualenv_prompt) in font.theme.sh. I changed it to $(condaenv_prompt) and now it worked. I also added a space between env prompt and hostname prompt for aesthetic purpose. I first tried python_version_prompt, but it shows the environment name followed by the interpreter version? That's not what I want.

shunzh avatar Nov 21 '20 02:11 shunzh

Same question. Any help to solve this problem?

Cppowboy avatar Mar 15 '21 11:03 Cppowboy

Same question. Any help to solve this problem?

Which theme you are using? if you are using the font theme then follow the shunzh's comment

muntakim1 avatar Mar 21 '21 04:03 muntakim1

For anyone who is using Agnoster, I enabled conda environment names by referring to https://github.com/speedenator/agnoster-bash/pull/24. Just add those 4 lines as seen in the 'Files changed tab' into prompt_virtualenv(). Credits to @prehensilecode

botsunny avatar Dec 11 '21 17:12 botsunny