Solvedoh my posh Git branch displayed 2 times and Python environment missing


  • I have read and understand the CONTRIBUTING guide
  • I looked for duplicate issues before submitting this one


Following an upgrade from oh-my-posh 2 to oh-my-posh-3, the theme application seems to have two issues:

  1. The conda environment of my user is not displayed by default (the base environment)
  2. When I move to a git directory, the branch name is displayed as a prefix to the prompt and in the prompt
  3. If I activate a virtual environment venv, it is also displayed as a prefix


  • Oh my Posh version: v3
  • Theme: aliens
  • Operating System: Microsoft Windows 10 Pro - 10.0.19042 Build 19042
  • Shell: Powershell
  • Terminal: Windows Terminal + VSCode

Steps to Reproduce

  1. Follow-up of the documentation for the update
  2. Set a theme
PS > Set-PoshPrompt -Theme aliens
  1. Export theme into PS profile
PS > Export-PoshTheme -FilePath ~/.oh-my-posh.omp.json
  1. Get the PS profile
  1. Edit the profile file :
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme  ~/.oh-my-posh.omp.json
  1. Restart computer and reload Powershell
  2. Move to a Python Git repository with virtualenv


Expected behavior:

Is it possible :

  • to have only once the git branch in the prompt?
  • to have only once the Python environment in the prompt ?
  • to have the conda base environment displayed by default ?
  • not to have the error on the Python environment in the prompt ?

Actual behavior:

Currently this is not possible :)

21 Answers

✔️Accepted Answer

@Kin-Zhang in that case, move the python segment before the text segment. They are rendered based on their order in the config so you can move them where yo'd like to see them. You can always share the config here and I'll gladly adjust it.

Related Issues:

oh my posh Powershell -NoLogo parameter render spaces between blocks
workaround : add cls in your $PROFILE (and still use -NoLogo) Prerequisites I have read and understa...
oh my posh Git branch displayed 2 times and Python environment missing
@Kin-Zhang in that case move the python segment before the text segment Prerequisites I have read an...
compose Docker-compose up failing because "port is already allocated"
I ran into the same issue today (with a postgres container) and despite having tried docker-compose ...
compose Compose error "HTTP request took too long to complete"
By simply restarting the docker service via sudo service docker restart I was able to get the aforem...
compose error on launching docker-compose by piping to sh ( echo 'docker-compose ... ' | sh )
I could get it to work by adding the -T parameter to not create a Pseudo-TTY docker-compose exec -T ...
compose docker-compose up fails if network attached to container is removed
Thanks for the report! I think there are several things to note here: First and foremost ...
compose Error when trying to run docker-compose up. "oci runtime error: container_linux.go:247..."
you gotta make the an executable before building the image: otherwise it cant b...
compose docker-compose up doesn't pull down latest image if the image exists locally
Imagine that git didn't have pull because git fetch && git merge origin/master is functionally ident...
compose Docker Compose mounts named volumes as 'root' exclusively
Actually I come here with news it seems what I am trying to achieve is doable but I don't know if th...
go question: "go: cannot find main module; see 'go help modules'"
After upgrade to go1.16 try to set : go env -w GO111MODULE=auto
go Proposal: A built-in Go error check function, "try"
I actually really like this proposal However I do have one criticism The exit point of functions in ...
protobuf protoc-gen-go: program not found or is not executable
I had this problem as well recently [using ubuntu 18.04] I found a long-lasting solution by adding t...
compose INTERNAL ERROR: cannot create temporary directory!
Confirming this happened to me Today Was running low on space: After removing a container.. it works...
compose docker-compose up -d doesn't expose ports when defined with build directive
oh you didn't specify but I'm assuming you're using run instead of up? If so you need --service-port...
compose How does compose chooses subnet for default network?
I'm also running into this issue Another way around this is to set the default-address-pools in your...
ddev In WSL2 ddev start fails at docker-credential-desktop.exe, "error listing credentials"
I had to set credsStore: in my ~/.docker/config.json .. it was previously set to credentials.exe ...
kubernetes ingress 413 Request Entity Too Large
FYI the annotation has changed and is now: Also I had to restart the nginx pod for the effect to tak...
dep dep init fails if in not in $GOPATH[...]/src/{somedir..}
why does dep depend on GOPATH? isn't the whole point to ignore GOPATH and use vendor as the place fo...
compose ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint ltg_db_1
The following worked for me when i do the following : ± docker-compose up Starting ltg_db_1 ERROR: f...
compose Release docker/compose image for armv7 / arm64v8
Last time I checked compose wants python 3 while raspbian's global python is still 2 apt-get install...
go proposal: Go 2: simplify error handling with || err suffix
A plain idea with support for error decoration There have been many proposals for how to simplify er...
compose I am having this "Encountered errors while bringing up the project." error
Does running docker-compose down solve the issue? when $ docker-compose up it returns Docker Version...
compose "Can't find a suitable configuration file" on Ubuntu 18.04.1
I ran into the same problem with a fresh Ubuntu 18.04 install where I selected Docker from install o...
compose How to make a Systemd Unit for docker-compose?
Place following content to the /etc/systemd/system/docker-compose@.service Place you docker-compose....
go runtime/cgo: fails to build after updating to Mojave
What version of Go are you using (go version)? GCC What did you do? update macOS to mojave install g...
compose docker-compose often takes a long time to do anything
For me the solution was to install haveged and it solved the issue out of the box: ...
go net/http: remove support for status code 418 I'm a Teapot
I would be saddened to see 418 removed It's a fun bit of flavor that does no harm ...
go go: don't change the libraries in 1.18
Agree For example it looked like we were going to add a few new things like constraints.Slice and co...
go cmd/go: modify the Go toolchain to work without GOPATH
But seriously in my experience the problem newcomers have with $GOPATH is not its prescribed namespa...
compose The input device is not a TTY
@mhverbakel solution with -T flag (docker-compose exec -T) is a part of the first comment itself but...
go cmd/go: go mod -vendor prunes non-package directories
I can't believe the proposed solution to this issue is to write another tool to finish what go mod v...
traefik Traefik 2.0 verbosity in setting up HTTP to HTTPS redirects
With the way middlewares work in traefik 2.0 I think the ideal solution would be to have some kind o...
compose Want a way to specify a dockerfile outside the context in the docker-compose dockerfile directive
It seems that you can use $PWD but it would be best to be able to use a relative path: ...
compose docker-compose inspect
For what it's worth: You can do something like (assuming the service to check is named foo) Hope tha...
go proposal: spec: add built-in result type (like Rust, OCaml)
I think this wouldn't be the right direction for Go ()) })! seriously? The main goal of Go should be...
compose Unable to get volumes to work with docker-compose in windows
ui:/src and ./ui:/src mean two different things The first one is using a named volume with name ui T...
compose Can't install in Ubuntu 16.04
My god.. Your problem is weird I just tried to install Docker Compose in a brand new VirtualBox Ubun...
compose "no such file or directory" issue
Just a note in case somebody winds up here for the same reasons I did: Various source control produc...
compose TypeError: environment can only contain strings when using run with .env file
OK Description of the issue docker-compose run fails to run when non-empty .env file is present prin...
compose docker-compose cannot use gcloud credential helper on Linux (pyinstaller release)
Another option is to run export CLOUDSDK_PYTHON=python2. Description of the issue docker-compose pul...
v2ray core vmess协议设计和实现缺陷可导致服务器遭到主动探测特征识别(附PoC)
简而言之,如果 GFW 怀疑你鸡上有个 vmess + tcp,他抓个包,然后按上面的方法进行重放,在我电脑上实测不用一秒钟你的 vmess + tcp 就被识别了,更别提 GFW 了。希望大家予以重...
compose Using data volume containers with v3
In this case I'll get the created volumes this is correct But I need to access the code inside my co...
dep dep fails with root project import: xxx not in GOPATH
most discussions tend to use shorthand that omits this for brevity but under GOPATH really means und...
compose "network_mode: host" does not use the network of host machine
If you just want to reach a service on the host from within a docker container on Mac OS X you canno...
ponzu no go files in /home/user/go/src/
try running go get -u via copy / paste that exact command. ...
go cmd/go: mod download doesn't allow insecure download
Disappointed to see this request being closed Many large enterprises don't manage certificates ideal...
dep dep ensure fails with grouped write of manifest, lock and vendor: cannot delete
What solved for me was removing /vendor What version of dep are you using (dep version)? v0.3.2 What...
go cmd/go: missing sum after updating a different package
For anyone running into this issue in Go 1.16 you can use go get on a package (or set of packages) i...
compose nginx proxy cannot resolve container hostnames (Version 2 Yaml)
Ok found a solution here: ...
compose Install using pip requires rust
I had the same issue I just added this export line before I install docker-compose with pip This is ...