Skip to content

Commit

Permalink
[master] Adding GURI_DOT_FILE & GURI_EXEC_DOT_FILE vars
Browse files Browse the repository at this point in the history
  • Loading branch information
victorfsf committed Nov 10, 2017
1 parent 6d6c744 commit cf7ecfc
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions guri.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,17 @@ docker_machine_prompt_info() {
fi
}

virtualenv_indicator() {
if [[ -z "$VIRTUAL_ENV" ]]; then
psvar[1]=""
psvar[2]=""
else
psvar[1]="${VIRTUAL_ENV##*/} "
psvar[2]=" v$(python --version 2>&1 | sed -e "s/Python //")"
run_dot_file() {
if [[ "$GURI_EXEC_DOT_FILE" -eq 1 ]] && [[ -f "$GURI_DOT_FILE" ]]; then
source "$GURI_DOT_FILE"
fi
}

local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"

GURI_DOCKER_ICON="@"
GURI_DOT_FILE=".guri"
GURI_EXEC_DOT_FILE=1
ZSH_THEME_GIT_PROMPT_PREFIX=""
ZSH_THEME_GIT_PROMPT_SUFFIX=""
ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]"
Expand All @@ -66,6 +64,7 @@ ZSH_THEME_GIT_PROMPT_BEHIND="$fg[magenta]⇣"
ZSH_THEME_GIT_PROMPT_DIVERGED="$ZSH_THEME_GIT_PROMPT_AHEAD$ZSH_THEME_GIT_PROMPT_BEHIND"
VIRTUAL_ENV_DISABLE_PROMPT="yes"

add-zsh-hook precmd run_dot_file
add-zsh-hook precmd virtualenv_indicator

PROMPT='
Expand Down

0 comments on commit cf7ecfc

Please sign in to comment.