Created
September 6, 2016 19:54
-
-
Save alicanerdogan/827d574b4a150e2b5e24d7b104aa1dac to your computer and use it in GitHub Desktop.
Default bashrc with git branch
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
# Preview: | |
# ae > /mnt/c/Users/Alican/Repos/aTorrent (master) | |
# $ | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
export PS1="\[$(tput bold)\]\[\033[38;5;230m\]\u\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput bold)\]>\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;14m\]\w\[$(tput sgr0)\]\[\033[38;5;15m\] \[\033[38;5;11m\]\$(parse_git_branch)\n\[$(tput bold)\]\[$(tput sgr0)\]\[\033[38;5;230m\]\\$\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;15m\] \[$(tput sgr0)\]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment