Created
October 25, 2015 15:31
-
-
Save hedgehog1029/dfbb7e66511e2c399157 to your computer and use it in GitHub Desktop.
ZSH theme: hedgehog
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
# hedgehog1029's theme | |
# Color shortcuts | |
R=$fg_no_bold[red] | |
B=$fg_no_bold[blue] | |
M=$fg_no_bold[magenta] | |
RESET=$reset_color | |
local return_side="%(?..%{$R%}%? ↵ %{$RESET%})" | |
function gitStatusF() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return | |
user=$(git remote -v | grep "fetch" | cut -d'/' -f 4) || return | |
repo=$(git remote -v | grep "fetch" | cut -d'/' -f 5 | cut -d'.' -f 1) || return | |
echo "(%B${ref#refs/heads/}@${user}/${repo}%b%{$RESET%}) " | |
} | |
# Prompt | |
PROMPT='%B%2~%b $(gitStatusF)%{$M%}➥ %{$RESET%}' | |
RPS1="${return_side}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment