开发者

Changing the prompt style of a virtualenv instance with zsh

开发者 https://www.devze.com 2023-01-14 07:00 出处:网络
I would like the change my zsh prompt style for every virtualenv instances that I use or create. My actual prompt is like this:

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 inf开发者_开发问答ormation before the prompt:

(the name of my venv)my_prompt

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


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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消