Skip to content

Instantly share code, notes, and snippets.

@jplattel
Last active January 18, 2020 12:27
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Personal zsh theme
function collapse_pwd {
echo $(pwd | sed -e "s,^$HOME,~,")
}
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '± >' && return
echo '>'
}
PROMPT='%{$fg[blue]%}%n%{$reset_color%} @ %{$fg[yellow]%}%m%{$reset_color%} = %{$fg_bold[red]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info)
$(prompt_char) '
RPROMPT='[%D{%H:%M:%S}]'
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[046]%}!"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$FG[083]%}?"
ZSH_THEME_GIT_PROMPT_CLEAN=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment