mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-02 02:19:06 +01:00
21 lines
710 B
Bash
21 lines
710 B
Bash
# mh theme
|
|
# preview: http://cl.ly/1y2x0W0E3t2C0F29043z
|
|
|
|
# features:
|
|
# path is autoshortened to ~30 characters
|
|
# displays git status (if applicable in current folder)
|
|
# turns username green if superuser, otherwise it is white
|
|
|
|
# if superuser make the username green
|
|
if [ $UID -eq 0 ]; then NCOLOR="green"; else NCOLOR="white"; fi
|
|
|
|
# prompt
|
|
PROMPT='[%{$fg[$NCOLOR]%}%B%n%b%{$reset_color%}:%{$fg[red]%}%30<...<%~%<<%{$reset_color%}]%(!.#.$) '
|
|
RPROMPT='$(git_prompt_info)'
|
|
|
|
# git theming
|
|
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[gray]%}(%{$fg_no_bold[yellow]%}%B"
|
|
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[gray]%})%{$reset_color%} "
|
|
ZSH_THEME_GIT_PROMPT_CLEAN=""
|
|
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}✱"
|
|
|