Skip to content

Instantly share code, notes, and snippets.

@Bregor
Created May 18, 2011 15:08
Show Gist options
  • Save Bregor/978764 to your computer and use it in GitHub Desktop.
Save Bregor/978764 to your computer and use it in GitHub Desktop.
Gentoo theme for oh-my-zsh with dollar sign instead of percent in unprivileged user prompt (as in gentoo).
function prompt_char {
if [ $UID -eq 0 ]; then echo "#"; else echo $; fi
}
PROMPT='%(!.%{$fg_bold[red]%}.%{$fg_bold[green]%}%n@)%m %{$fg_bold[blue]%}%(!.%1~.%~) $(git_prompt_info)%_$(prompt_char)%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=") "
@graingert
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment