Created
September 11, 2013 00:41
-
-
Save ajcrites/6517907 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
randomize_prompt_color () { | |
git=$(git_prompt_info) | |
if [ -n "$git" ]; then | |
git="$git " | |
fi | |
PROMPT="%{$fg_bold[green]%}%n%F{$((RANDOM % 8))}@%{$fg[magenta]%}%m %{$fg_bold[cyan]%}%~ %{$fg_bold[blue]%}$git%{$fg_bold[red]%}%(!.#.\$) %{$reset_color%}" | |
if [ -n "$VIRTUAL_ENV" ]; then | |
PROMPT="(pyvenv: $(basename $VIRTUAL_ENV)) $PROMPT" | |
fi | |
} | |
add-zsh-hook precmd randomize_prompt_color |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment