未验证 提交 749823b7 编写于 作者: L lucasgnavarro 提交者: GitHub

themes/agnoster: Changes in prompt_virtualenv() function in order to show the...

themes/agnoster: Changes in prompt_virtualenv() function in order to show the python version and not the folder name. (#147)
上级 2a41e70e
......@@ -208,13 +208,18 @@ prompt_end() {
### virtualenv prompt
prompt_virtualenv() {
if [[ -n $VIRTUAL_ENV ]]; then
# the last word in --version command correspond to version number
for e in $($VIRTUAL_ENV/bin/python --version)
do
VENV_VERSION=$e
done
color=cyan
prompt_segment $color $PRIMARY_FG
prompt_segment $color white "$(basename $VIRTUAL_ENV)"
prompt_segment $color white "$(basename $VENV_VERSION)"
fi
}
### Prompt components
# Each component will draw itself, and hide itself if no information needs to be shown
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册