JanDeDobbeleer / oh-my-posh

The most customisable and low-latency cross platform/shell prompt renderer
https://ohmyposh.dev
MIT License
16.7k stars 2.34k forks source link

The conda environment name disappears when windows powershell enters the user's root directory. #5324

Closed md3356 closed 1 month ago

md3356 commented 1 month ago

Code of Conduct

What happened?

I switched conda environments conda activate labelme in the user root directory, and using conda env list, I could see that the switch was indeed successful, but the conda environment name did not appear. However, when I cd into the subdirectory, the environment name 'labelme' appeared and it was a correct env. But when I cd .. back to the user root dir and it disappears again. image btw, I am using windows terminal, my cmd, powershell are not configured with oh-my-posh, they are all fine, it only appears on windows powershell which is configured with oh-my-posh.

Theme

I've tried many themes which can show conda envs. Such as "ys", "space"......

What OS are you seeing the problem on?

Windows

Which shell are you using?

other (please specify)

Log output

No output
JanDeDobbeleer commented 1 month ago

@md3356 this is disabled by default in the user's home directory. Set home_enabled to true in the python segment.

md3356 commented 1 month ago

@md3356 this is disabled by default in the user's home directory. Set home_enabled to true in the python segment.

Thanks for the reply, this worked! But this seems to require adding this line of code to all the json files of the theme I want to use? Is there a more convenient way to solve this at once?

JanDeDobbeleer commented 1 month ago

@md3356 If you want to adjust a theme, which in theory is only a sample configuration, export it locally and reference + edit that file.