Skip to content

Instantly share code, notes, and snippets.

@brecke
Created September 21, 2014 09:47
Show Gist options
  • Save brecke/b5082b49065f59c0b89c to your computer and use it in GitHub Desktop.
Save brecke/b5082b49065f59c0b89c to your computer and use it in GitHub Desktop.
Zsh theme with PYENV support
# theme based on norm but with pyenv support for python development
PYENV_PROMPT_DEFAULT_VERSION=${PYENV_PROMPT_DEFAULT_VERSION:="system"}
function _pyenv_prompt_info {
[[ -n $(whence pyenv_prompt_info) ]] && \
[[ "$(pyenv_prompt_info)" != "${PYENV_PROMPT_DEFAULT_VERSION}" ]] && \
echo "${ZSH_THEME_PYENV_PROMPT_PREFIX}$(pyenv_prompt_info)${ZSH_THEME_PYENV_PROMPT_SUFFIX}"
}
PROMPT='%{$fg[yellow]%}λ %m %{$fg[green]%}%c %{$fg[yellow]%}$(_pyenv_prompt_inff
o)$(git_prompt_info)%{$fg[blue]%}�~F~R %{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[blue]%}[%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[blue]%}] "
ZSH_THEME_PYENV_PROMPT_PREFIX="%{$fg[blue]%}{%{$fg[red]%}"
ZSH_THEME_PYENV_PROMPT_SUFFIX="%{$fg[blue]%}} "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment