Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the prompt style of a virtualenv instance with zsh

I would like the change my zsh prompt style for every virtualenv instances that I use or create. My actual prompt is like this:

declare PS1="%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%3~%{$reset_color%}"

When I activate a virtualenv it just adds some information before the prompt:

(the name of my venv)my_prompt

Do you know a way to change the colors or styles?

like image 835
Jérôme Pigeot Avatar asked Sep 05 '10 12:09

Jérôme Pigeot


2 Answers

If you use virtualenvwrapper you can use its hooks to do this.

like image 153
Ian Bicking Avatar answered Nov 09 '22 19:11

Ian Bicking


And you can use virtualenvwrapper plugin in the ~/.zshrc,Don't use virtualenv plugin together with virtualenvwrapper.

like image 37
bnPYSse Avatar answered Nov 09 '22 21:11

bnPYSse