Last active
November 7, 2016 06:20
-
-
Save ihower/dec41671245eceff56d1 to your computer and use it in GitHub Desktop.
.bash_profile
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
alias stree='/Applications/SourceTree.app/Contents/Resources/stree' | |
alias subl="'/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl'" | |
function parse_git_dirty { | |
if [[ $(git status 2> /dev/null | tail -n1) == "nothing to commit, working directory 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/}") "; | |
} | |
PATH=$HOME/bin:/usr/local/bin:$PATH | |
PS1="[\[\033[1;32m\]\w\[\033[0m\]] \[\033[0m\]\[\033[1;36m\]\$(git_branch)\[\033[0;33m\]\\[\033[0m\]♨ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
git 版本2.10以上
nothing to commit, working directory clean
改成
nothing to commit, working tree clean