Last active
November 6, 2018 19:03
-
-
Save badsyntax/ada6376354efb7538a8596254a35fc97 to your computer and use it in GitHub Desktop.
latest .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
shopt -s autocd | |
shopt -s cdspell | |
shopt -s direxpand | |
shopt -s dirspell | |
alias ls="ls -G" | |
export GREP_OPTIONS='--color=always' | |
if [ -f "$(brew --prefix)/etc/bash_completion" ]; then | |
. $(brew --prefix)/etc/bash_completion | |
fi | |
if [ -f "$(brew --prefix)/etc/profile.d/z.sh" ]; then | |
. $(brew --prefix)/etc/profile.d/z.sh | |
fi | |
prompt_command () { | |
GIT_PS1_SHOWDIRTYSTATE=true | |
GIT_PS1_SHOWCOLORHINTS=true | |
GIT_PS1_SHOWUPSTREAM="auto" | |
GIT_PS1_SHOWUNTRACKEDFILES=true | |
PROMPT_DIRTRIM=4 | |
local MAGENTA=$(tput setaf 9) | |
local ORANGE=$(tput setaf 172) | |
local GREEN=$(tput setaf 190) | |
local PURPLE=$(tput setaf 141) | |
local BOLD=$(tput bold) | |
local RESET=$(tput sgr0) | |
symbol="⚡ " | |
export PS1="\[${MAGENTA}\]\u \[$RESET\]in \[$GREEN\]\w\[$RESET\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(__git_ps1 '%s')\[$RESET\]\n\$symbol\[$RESET\]" | |
} | |
PROMPT_COMMAND=prompt_command | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment