Skip to content

Instantly share code, notes, and snippets.

@prati0100
Created May 27, 2019 12:43
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save prati0100/9cf09f47b1b7532af815fefb7e48db03 to your computer and use it in GitHub Desktop.
Save prati0100/9cf09f47b1b7532af815fefb7e48db03 to your computer and use it in GitHub Desktop.
Change color of prompt of robbyrussell zsh theme to yellow if root
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
# PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} '
# Change color of prompt to yellow if root
PROMPT='${ret_status} %{%(#~$fg[yellow]~$fg[cyan])%}%c%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment