Last active
January 18, 2020 12:27
-
-
Save jplattel/34f14bb95854c84a547d7049142270b0 to your computer and use it in GitHub Desktop.
Personal zsh theme
This file contains hidden or 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
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