Created
November 3, 2015 21:51
-
-
Save MarcoSero/fa11249d9215fe35b655 to your computer and use it in GitHub Desktop.
Fast git prompt
This file contains 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
# Load oh-my-zsh first | |
source $ZSH/oh-my-zsh.sh | |
# If we are on a big repo, re-define git prompt | |
function git_prompt_info() { | |
if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]]; then | |
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ | |
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0 | |
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX" | |
fi | |
} | |
function git_prompt_status() { | |
echo '' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment