Skip to content

Instantly share code, notes, and snippets.

@octavioturra
Forked from eduardomartines/.zshrc
Last active August 29, 2015 14:20
Show Gist options
  • Select an option

  • Save octavioturra/148452d14fdf37bc6520 to your computer and use it in GitHub Desktop.

Select an option

Save octavioturra/148452d14fdf37bc6520 to your computer and use it in GitHub Desktop.
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
plugins=(git)
source $ZSH/oh-my-zsh.sh
export PATH="~/.rbenv/shims:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
function collapse_pwd {
echo $(pwd | sed -e "s,^$HOME,~,")
}
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
echo '○'
}
PROMPT='
%{$fg[cyan]%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info) $(prompt_char) '
RPROMPT='%{$fg_bold[green]%}[$(date +%H:%M:%S)]%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[cyan]%}!"
ZSH_THEME_GIT_PROMPT_CLEAN=""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment