Last active
December 20, 2015 18:28
-
-
Save gvieira/6175883 to your computer and use it in GitHub Desktop.
I love zsh, but bash keeps things simpler.
You can add it directly to .bash_profile or create a new file and source it in .bash_profile. References:
- For git branch, the internet!
- For prompt, https://github.com/sindresorhus/pure.
- For theme, https://github.com/chriskempson/tomorrow-theme.
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
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" | |
} | |
export PS1='\[\033[34m\]\w \[\033[1;30m\]$(parse_git_branch)\[\033[0m\]\n\[\033[1;35m\]❯ \[\033[0m\]' | |
export CLICOLOR=1 | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
alias ls='ls -G' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment