1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-12-22 15:21:30 +01:00

zsh-theme: change color virtualenv segment

This commit is contained in:
bretello 2020-12-04 01:56:14 +01:00
parent 90d8d7258b
commit 194f058b8a
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

View File

@ -41,7 +41,19 @@ ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="%F{255}<%f"
ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%F{255}<>%f"
function virtualenv_info {
[ $VIRTUAL_ENV ] && echo ' %F{27}<'$(basename $VIRTUAL_ENV)'> %f'
[ -z "$VIRTUAL_ENV" ] && return
local BOLD_PURPLE='%B%F{5}'
local CLEAR='%f%b'
local venv
venv="$(basename "$VIRTUAL_ENV")"
if [[ "$venv" == ".venv" ]]; then
venv="$(basename $(dirname "$VIRTUAL_ENV") )"
fi
echo -n "$BOLD_PURPLE"
echo -n " <$venv> "
echo -n "$CLEAR"
}
function git_prompt() {