Skip to content

Instantly share code, notes, and snippets.

@AAlfarho
Created October 3, 2017 06:27
Show Gist options
  • Save AAlfarho/94ee95542a3efa65cd72aae14e62fc78 to your computer and use it in GitHub Desktop.
Save AAlfarho/94ee95542a3efa65cd72aae14e62fc78 to your computer and use it in GitHub Desktop.
### load extenstions ###
source "$HOME/.git-completion.bash"
source "$HOME/.git-prompt.sh"
### ENV variables ###
# look for commands in these places
export PATH="/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH"
# make vim the default text editor
export EDITOR="vim"
# shortened prompt that includes git branch info
RED='\[\e[0;31m\]'
#WHITE='\[\e[1;37m\]'
RESET='\[\e[0m\]'
# Colours check them here http://misc.flogisoft.com/bash/tip_colors_and_formatting
GREEN='\[\033[0;32m\]'
YELLOW='\[\033[1;33m\]'
BROWN='\[\033[0;33m\]'
LRED='\[\033[1;31m\]'
RED='\[\033[0;31m\]'
BLUE='\[\033[0;96m\]'
WHITE='\[\033[0;37m\]'
NC='\[\033[0m\]'
LBLUE='\[\033[38;5;24m\]'
# Symbols
GOOD='\342\234\223'
BAD='\342\234\227'
LINE='\342\224\200'
# Custom Prompt
#export PS1="${WHITE}\342\224\214${LINE}[\$(if [[ \$? == 0 ]]; then echo \"${GREEN}${GOOD}\"; else echo \"${RED}${BAD}\"; fi)${WHITE}]${LINE}$()[\$(if [[ ${EUID} == 0 ]]; then echo '${RED}\u ${WHITE}@'\$(__git_ps1); else echo '${RED}\u ${WHITE}@'\$(__git_ps1); fi)${WHITE}]${LINE}[${GREEN}\w${WHITE}]\n${WHITE}\342\224\224${LINE}> \\$ ${NC}"
export PS1="${WHITE}\342\224\214${LINE}[\$(if [[ \$? == 0 ]]; then echo \"${GREEN}${GOOD}\"; else echo \"${RED}${BAD}\"; fi)${WHITE}]${LINE}$()[\$(if [[ ${EUID} == 0 ]]; then echo '${RED}\u ${WHITE}@ ${GREEN}\w${WHITE}'; else echo '${RED}\u ${WHITE}@ ${GREEN}\w${WHITE}'; fi)${WHITE}]\$(__git_ps1)\n${WHITE}\342\224\224${LINE}> \\$ ${NC}"
#export PS1="$RED\w$WHITE\$(__git_ps1)$RED\$$RESET "
### other ###
# initialize rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# initialize node version manager
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
# load aliases
[[ -f "$HOME/.aliases" ]] && source "$HOME/.aliases"
# load any local configuration
[[ -f "$HOME/.bashrc.local" ]] && source "$HOME/.bashrc.local"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment