Created
February 16, 2017 05:14
-
-
Save ihower/7c003373fa8db8fc8ee8a55a48a4b537 to your computer and use it in GitHub Desktop.
This file contains 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
# https://github.com/mrzool/bash-sensible | |
source ~/.sensible.bash | |
alias stree='/Applications/SourceTree.app/Contents/Resources/stree' | |
alias x="exit" | |
alias c="clear" | |
export LC_ALL=en_US.UTF-8 | |
export LC_CTYPE=en_US.UTF-8 | |
export LANG=en-US | |
export EDITOR="atom" | |
function parse_git_dirty { | |
if [[ $(git status 2> /dev/null | tail -n1) == "nothing to commit, working tree clean" ]]; then | |
echo "✔ " | |
else | |
echo "✘ " | |
fi | |
} | |
function git_branch { | |
ref=$(git symbolic-ref HEAD 2> /dev/null) || return; | |
echo "("$(parse_git_dirty)${ref#refs/heads/}")"; | |
} | |
function ruby_version { | |
# echo "$(rbenv version | sed -e 's/ .*//')"; | |
echo "$(~/.rvm/bin/rvm-prompt)" | |
} | |
# with ruby_version 🚀 | |
PS1="[\[\033[1;32m\]\w\[\033[0m\]] \[\033[0m\]\[\033[1;36m\]\$(git_branch)\[\033[0;33m\]\\[\033[0m\]\[\033[0;33m\]\$(ruby_version)\[\033[0m\]😆 " | |
#PS1="[\[\033[1;32m\]\w\[\033[0m\]] \[\033[0m\]\[\033[1;36m\]\$(git_branch)\[\033[0;33m\]\\[\033[0m\]😆 " | |
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment