Last active
September 23, 2017 17:25
-
-
Save diewland/596b05a716bf671cbfbb4fbcf1c2e97e to your computer and use it in GitHub Desktop.
My bashrc
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
# auto start tmux | |
if [[ ! $TERM =~ screen ]]; then | |
tmux a || tmux new | |
fi | |
# custom prompt | |
export PS1="\[\033[36m\]\u\[\033[33;1m\]\w\[\033[0;32m\]\$(__git_ps1 '(%s)') \[\033[36m\]\$\[\033[m\] " | |
### macos ### | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\[\033[36m\]\u\[\033[33;1m\]\w\[\033[0;32m\]\$(parse_git_branch '(%s)') \[\033[36m\]\$\[\033[m\] " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment