Skip to content

Instantly share code, notes, and snippets.

@Darkhogg
Created March 21, 2014 19:37
Show Gist options
  • Save Darkhogg/9694454 to your computer and use it in GitHub Desktop.
Save Darkhogg/9694454 to your computer and use it in GitHub Desktop.
A theme for oh-my-zsh
local _c_reset="$reset_color"
local _c_user="$fg_bold[green]"
local _c_host="$fg_bold[yellow]"
local _c_path="$fg_bold[blue]"
local _c_git_branch="$fg_bold[magenta]"
local _c_git_dirty="$fg_bold[cyan]"
local _c_prompt="$fg_bold[white]"
local ret_status="%(?::
%{$fg_bold[red]%}%?%s)"
local prompt_char="$(if [ "$UID" -eq "0" ]; then echo '#'; else echo '$'; fi)"
PROMPT='$ret_status
%{$_c_user%}%n%{$_c_reset%} at %{$_c_host%}%m%{$_c_reset%} in %{$_c_path%}${PWD/#$HOME/~}%{$_c_reset%}$(git_prompt_info)
%{$_c_prompt%}$prompt_char %{$_c_reset%}'
RPROMPT=''
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$_c_git_branch%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$_c_reset%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$_c_git_dirty%}*"
ZSH_THEME_GIT_PROMPT_CLEAN=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment