Skip to content

Instantly share code, notes, and snippets.

@anthonyclarka2
Created September 9, 2019 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anthonyclarka2/9d041ce5e2590204f118156cef048ff4 to your computer and use it in GitHub Desktop.
Save anthonyclarka2/9d041ce5e2590204f118156cef048ff4 to your computer and use it in GitHub Desktop.
a simple modification of the oh-my-zsh theme "afowler" without the hostname included, and adding ROOT in red letters when $uid=0
if [ $UID -eq 0 ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{${fg_bold[$CARETCOLOR]}%}ROOT%{${reset_color}%} %{${fg_bold[blue]}%}:: %{$reset_color%}%{${fg[green]}%}%3~ $(git_prompt_info)%{${fg_bold[$CARETCOLOR]}%}»%{${reset_color}%} '
RPS1="${return_code}"
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹"
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment