Create a gist now

Instantly share code, notes, and snippets.

@nickbarnwell /.bashrc Secret
Created Apr 2, 2018

Embed
What would you like to do?
#Make bash use vi keybinds
set -o vi
#Support Colors, set prompt
PROMPT_COMMAND='PS1="\[\033[0;33m\][\!]\`if [[ \$? = "0" ]]; then echo "\\[\\033[32m\\]"; else echo "\\[\\033[31m\\]"; fi\`[\u@\h: \`if (( `pwd|wc -c|tr -d " "` > 18 )); then echo "\"\\W\""; else echo "\"\\w\""; fi\`]\$\[\033[0m\] ";'
export CLICOLOR=1
#history settings: http://blog.sanctum.geek.nz/better-bash-history/
shopt -s histappend
HISTFILESIZE=1000000
HISTSIZE=1000000
HISTCONTROL=ignoreboth
HISTIGNORE='ls:bg:fg:history'
HISTTIMEFORMAT='%F %T '
shopt -s cmdhist
### Load Completion Blocks ###
if [ -e "brew" ]; then
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
fi
if [ -f "/etc/bash_completion" ]; then
. "/etc/bash_completion"
fi
if [ -f "/usr/local/etc/bash_completion.d" ]; then
. "/usr/local/etc/bash_completion.d"
fi
if [ -f "/usr/local/etc/bash_completion" ]; then
. "/usr/local/etc/bash_completion"
fi
### Aliases and Env Setup ###
if [ -f "$HOME/.aws/keys" ]; then
. "$HOME/.aws/keys"
fi
if [ -e "$HOME/.extra" ]; then
for f in "$HOME/.extra/"*; do
. "$f"
done
fi
export PATH=$HOME/bin:$PATH
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PYENV_ROOT=/usr/local/var/pyenv
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
export FIGNORE=.pyc:.class:.svn:.o:.hi
if [ -e "/usr/libexec_java_home" ]; then
export JAVA_HOME=`/usr/libexec/java_home -v 1.8`
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment