Skip to content

Instantly share code, notes, and snippets.

@zet4
Created March 8, 2016 09:21
Show Gist options
  • Save zet4/46b3e1f33cfc0b4b68cb to your computer and use it in GitHub Desktop.
Save zet4/46b3e1f33cfc0b4b68cb to your computer and use it in GitHub Desktop.
My version of kardan theme.
# My version of kardan theme.
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
function get_host {
echo '@'$HOST
}
function get_user {
echo "%{$fg[$NCOLOR]%}(as "`who am i | sed -e 's/ .*//'`")%{$reset_color%}"
}
PROMPT='> '
RPROMPT='%`expr $COLUMNS - 80`<...<%~%>>$(git_prompt_info)$(get_host) $(get_user)'
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_PREFIX="("
ZSH_THEME_GIT_PROMPT_SUFFIX=")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment