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

virtualenv support? #10

Closed
brianjking opened this issue Feb 2, 2016 · 4 comments
Closed

virtualenv support? #10

brianjking opened this issue Feb 2, 2016 · 4 comments

Comments

@brianjking
Copy link

Is there a way to see if I'm working in a virtualenv when using Agnoster (Prezto & iTerm2 on OS X 10.11)?

@MichaelAquilina
Copy link
Contributor

I had the same question and decided to fix it myself. Take a look at my pull request: #11

@diraol
Copy link

diraol commented Jun 2, 2016

I'm using the virtualenvwrapper plugin.
With it, I've added the following codes on ~/.virtualenvs/postactivate:

PS1="$_OLD_VIRTUAL_PS1"
_OLD_RPROMPT="$RPROMPT"
RPROMPT="%{${fg_bold[white]}%}(env: %{${fg[white]}%}`basename \"$VIRTUAL_ENV\"`%{${fg_bold[white]}%})%{${reset_color}%} $RPROMPT"

And the following on ~/.virtuanenvs/postdeactivate:

RPROMPT="$_OLD_RPROMPT"

With that I have a marker on the right side of the screen with the current virutalenv while I'm on the directory related to that venv. Something like: (env: envName) (right aligned)

@MichaelAquilina
Copy link
Contributor

We can probably close this @agnoster . It has been supported for a while now

@apjanke
Copy link
Collaborator

apjanke commented Jan 3, 2020

Closing as Fixed.

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

4 participants