Skip to content

Instantly share code, notes, and snippets.

@guicheffer
Last active July 6, 2018 10:45
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guicheffer/ceec220385fb54a9f9c49d4a111f6021 to your computer and use it in GitHub Desktop.
Save guicheffer/ceec220385fb54a9f9c49d4a111f6021 to your computer and use it in GitHub Desktop.
My theme on iTerm2
# @guicheffer.zsh-theme, based on gnzh by Matthew Nelson.
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..❌)%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_PREFIX="|"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%}⚡%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_AHEAD="%{$fg_bold[red]%}!%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}✓%{$reset_color%} "
# Format for git_prompt_long_sha() and git_prompt_short_sha()
ZSH_THEME_GIT_PROMPT_SHA_BEFORE="➤ %{$fg_bold[yellow]%}"
ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}"
function prompt_char() {
git branch >/dev/null 2>/dev/null && echo "%{$fg[green]%}±%{$reset_color%}" && return
# hg root >/dev/null 2>/dev/null && echo "%{$fg_bold[red]%}☿%{$reset_color%}" && return
# darcs show repo >/dev/null 2>/dev/null && echo "%{$fg_bold[green]%}❉%{$reset_color%}" && return
echo "%{$fg[cyan]%}◯%{$reset_color%}"
}
PROMPT='%{$fg[magenta]%}@guicheffer%{$reset_color%} 🙈 %{$fg[cyan]%}%~ %{$reset_color%}$(git_prompt_short_sha)$(git_prompt_info)
%{$fg[red]%}%!%{$reset_color%} $(prompt_char) : '
RPROMPT='${return_status}%{$reset_color%}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment