Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virtual environtment is displayed twice #23

Open
ddejohn opened this issue Aug 1, 2021 · 1 comment
Open

virtual environtment is displayed twice #23

ddejohn opened this issue Aug 1, 2021 · 1 comment

Comments

@ddejohn
Copy link

ddejohn commented Aug 1, 2021

I copy-pasted this straight from the README

Import-Module pure-pwsh
Import-Module posh-git

$pure.PrePrompt = {
    param ($user, $cwd, $git, $slow)
    "`n$user{1}{0}$cwd $git $slow `n" -f
    ($user ? ' ' : ''),
    (($ve = $env:virtual_env) ? "$($pure._branchcolor)($(Split-Path -Leaf $ve)) " : "" )
}

And here's my prompt:

(venv)
(venv) ~\programming\python\some_project_with_venv main*

I tried to figure this out myself but the PowerShell syntax is really difficult for me to parse and I couldn't tell what needed changing.

@nickcox
Copy link
Owner

nickcox commented Aug 12, 2021

Sorry for the delay, @ddejohn. That's the out of the box venv prompt displayed in the first line.

The easiest way to disable it is to set $env:VIRTUAL_ENV_DISABLE_PROMPT=1 before you run Activate.ps1. I probably ought to update the readme.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants