Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.