使用zsh更改virtualenv实例的提示符样式

10
我想要改变我的zsh提示符样式,以便在我使用或创建的每个虚拟环境实例中都能应用。 我当前的提示符是这样的:
declare PS1="%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}%3~%{$reset_color%}"

当我激活一个虚拟环境时,它只是在提示符之前添加了一些信息:

(the name of my venv)my_prompt

你知道改变颜色或样式的方法吗?

2个回答

13

3
在~/.zshrc中,您可以使用virtualenvwrapper插件,不要与virtualenv插件一起使用。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接