Skip to content

Instantly share code, notes, and snippets.

@maatthc
Last active March 29, 2023 07:01
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 maatthc/38d21e56607c454fd6d6764dea3c671e to your computer and use it in GitHub Desktop.
Save maatthc/38d21e56607c454fd6d6764dea3c671e to your computer and use it in GitHub Desktop.
My own Oh My Zsh (https://github.com/ohmyzsh/ohmyzsh) theme.
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if [[ $AWS_SESSION_TOKEN ]]; then
AWS="$FG[208] [AWS]$reset_color ";
fi
PROMPT='%{$fg[$NCOLOR]%}%n%{$reset_color%}@%{$fg[cyan]%}%m\
%{$reset_color%}:%{$fg[magenta]%}%~\
$(git_prompt_info) \
$AWS%{$fg_bold[green]%}%(!.#. ➜)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='${return_code}'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}○%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}⚡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment