10

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?

cspolton
  • 4,495
  • 4
  • 26
  • 34
Jérôme Pigeot
  • 2,091
  • 4
  • 22
  • 25

2 Answers2

13

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

snakecharmerb
  • 47,570
  • 11
  • 100
  • 153
Ian Bicking
  • 9,762
  • 6
  • 33
  • 32
3

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

bnPYSse
  • 397
  • 4
  • 12