Created
October 11, 2018 13:44
-
-
Save bjgill/49fa6b3ee15ed117d03b822d967f1751 to your computer and use it in GitHub Desktop.
.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
# I, for one, am ready to be polite to our new robot overlords. | |
eval $(thefuck --alias oops) | |
alias please=sudo | |
# Prompt with colors and git branch information | |
if [[ $(id -u -n) != "<username>" ]]; then | |
USERNAME_STRING='\[\033[0;32m\]\u' | |
else | |
USERNAME_STRING='' | |
fi | |
if [[ $(hostname) != "<hostname>" ]]; then | |
HOSTNAME_STRING='\[\033[0;31m\]\h r' | |
else | |
HOSTNAME_STRING='' | |
fi | |
GITBRANCH_COLOUR='\[\033[0;33m\]' | |
NC='\[\033[0m\]' | |
# The prompt itself | |
export PS1="[${USERNAME_STRING}${NC}@${HOSTNAME_STRING}${GITBRANCH_COLOUR}(\$(svn info 2>/dev/null | grep <home dir> | colrm 1 37)\$(git symbolic-ref --short HEAD 2> /dev/null)) ${NC}\W]\$ " | |
# Terminal tab title | |
export PROMPT_COMMAND='echo -ne "\033]0;${USERNAME_STRING}@${HOSTNAME_STRING}: ${PWD/$HOME/~}\007"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment