better venv reporting in the shell

This commit is contained in:
Haak Saxberg 2015-06-04 15:02:45 -07:00
parent 43f0fe2387
commit 3223d51bdc
2 changed files with 9 additions and 2 deletions

@ -1 +1 @@
Subproject commit 140034605edd0f72c548685d39e49687a44c1b23 Subproject commit 9c755511f0c8e96eb893226ee43947bb3eef6666

View file

@ -97,7 +97,14 @@ ZSH_THEME_GIT_PROMPT_RENAMED=" %{$YELLOW%}[R]%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}⇶%{$RESET_COLOR%}" ZSH_THEME_GIT_PROMPT_ADDED=" %{$GREEN%}⇶%{$RESET_COLOR%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED%}☢%{$RESET_COLOR%}" ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RED%}☢%{$RESET_COLOR%}"
function in_venv {
VIRTUALENV_DISPLAY_STRING=${VIRTUAL_ENV##*/}
if [ ! -z "$VIRTUALENV_DISPLAY_STRING" ]; then
echo "($VIRTUALENV_DISPLAY_STRING) "
fi
}
PROMPT=' PROMPT='
%{$fg_bold[green]%}[%n@%m] %{$fg[yellow]%}[%~]%{$reset_color%} %{$fg_bold[green]%}[%n@%m]%{$fg[white]%} $(in_venv)%{$fg[yellow]%}[%~]%{$reset_color%}
$(in_sandbox)%{$fg[blue]%}>%{$reset_color%} ' $(in_sandbox)%{$fg[blue]%}>%{$reset_color%} '
RPROMPT='$(git_prompt_ahead)$(parse_git_dirty) $(branch_prompt)%{$reset_color%} %{$reset_color%}' RPROMPT='$(git_prompt_ahead)$(parse_git_dirty) $(branch_prompt)%{$reset_color%} %{$reset_color%}'