Skip to content

Instantly share code, notes, and snippets.

@hedgehog1029
Created October 25, 2015 15:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hedgehog1029/dfbb7e66511e2c399157 to your computer and use it in GitHub Desktop.
Save hedgehog1029/dfbb7e66511e2c399157 to your computer and use it in GitHub Desktop.
ZSH theme: hedgehog
# 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