Created
March 3, 2014 21:38
-
-
Save jfelipe/9335147 to your computer and use it in GitHub Desktop.
zlogin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adds the current branch name in green | |
git_prompt_info() { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) | |
if [[ -n $ref ]]; then | |
echo "[%{$fg_bold[green]%}${ref#refs/heads/}%{$reset_color%}]" | |
fi | |
} | |
# makes color constants available | |
autoload -U colors | |
colors | |
# enable colored output from ls, etc | |
export CLICOLOR=1 | |
export LSCOLORS=cafxcxdxbxegedabageaea | |
# expand functions in the prompt | |
setopt promptsubst | |
# prompt | |
export PS1='$(git_prompt_info)[${SSH_CONNECTION+"%{$fg_bold[green]%}%n@%m:"}%{$fg_bold[blue]%}%~%{$reset_color%}] ' | |
# load thoughtbot/dotfiles scripts | |
export PATH="$HOME/.bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment