mirror of
https://git.decapod.one/brethil/dotfiles
synced 2024-11-22 03:21:30 +01:00
zsh-theme: change color virtualenv segment
This commit is contained in:
parent
90d8d7258b
commit
194f058b8a
|
@ -41,7 +41,19 @@ ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="%F{255}<%f"
|
||||||
ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%F{255}<>%f"
|
ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="%F{255}<>%f"
|
||||||
|
|
||||||
function virtualenv_info {
|
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() {
|
function git_prompt() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user