2014-06-09 04:26:07 +00:00
|
|
|
if [ -f /etc/bash_completion ]; then
|
|
|
|
source /etc/bash_completion
|
|
|
|
fi
|
|
|
|
|
2018-10-07 06:27:05 +00:00
|
|
|
awsAutocomplete=$(which aws_completer)
|
|
|
|
if [ -n "${awsAutocomplete}" ]; then
|
|
|
|
complete -C "${awsAutocomplete}" aws
|
|
|
|
fi
|
2018-11-13 18:26:44 +00:00
|
|
|
if [ -f /usr/local/etc/bash_completion.d/git-completion.bash ]; then
|
|
|
|
source /usr/local/etc/bash_completion.d/git-completion.bash
|
|
|
|
fi
|
|
|
|
if [ -f /usr/local/etc/bash_completion.d/git-prompt.sh ]; then
|
|
|
|
source /usr/local/etc/bash_completion.d/git-prompt.sh
|
|
|
|
fi
|
2018-11-20 16:59:26 +00:00
|
|
|
if type brew 2&>/dev/null; then
|
|
|
|
for completion_file in $(brew --prefix)/etc/bash_completion.d/*; do
|
|
|
|
source "$completion_file"
|
|
|
|
done
|
|
|
|
fi
|
2018-10-07 06:27:05 +00:00
|
|
|
|
2014-04-21 16:27:52 +00:00
|
|
|
export EDITOR=vim
|
|
|
|
|
|
|
|
GIT_PS1_SHOWDIRTYSTATE=1
|
|
|
|
GIT_PS1_SHOWUNTRACKEDFILES=1
|
|
|
|
GIT_PS1_SHOWUPSTREAM=verbose
|
|
|
|
GIT_PS1_SHOWCOLORHINTS=1
|
|
|
|
GIT_PS1_SHOWSTASHSTATE=1
|
|
|
|
|
|
|
|
GREEN="\[\033[1;32m\]"
|
|
|
|
BLUE="\[\033[1;34m\]"
|
|
|
|
MAGENTA="\[\033[1;35m\]"
|
|
|
|
YELLOW="\[\033[1;33m\]"
|
|
|
|
RESET="\[\033[0m\]"
|
|
|
|
|
|
|
|
function set_bash_prompt() {
|
2018-10-07 06:27:05 +00:00
|
|
|
PS1="$GREEN\u@\h$RESET:$BLUE\w$MAGENTA$(__git_ps1 " (%s)")$RESET "
|
2014-04-21 16:27:52 +00:00
|
|
|
}
|
|
|
|
|
2018-10-07 06:27:05 +00:00
|
|
|
if [ "$(type -t __git_ps1)" = "function" ]; then
|
|
|
|
PROMPT_COMMAND=set_bash_prompt
|
|
|
|
else
|
|
|
|
PS1="$GREEN\u@\h$RESET:$BLUE\w$RESET "
|
|
|
|
fi
|
2014-04-21 16:27:52 +00:00
|
|
|
|
2018-11-13 18:26:44 +00:00
|
|
|
colorOption="--color=auto"
|
|
|
|
if [ "$(uname)" = "Darwin" ]; then
|
|
|
|
colorOption=-G
|
|
|
|
fi
|
|
|
|
|
|
|
|
alias ls="ls ${colorOption}"
|
2018-11-20 16:59:26 +00:00
|
|
|
alias grep="grep --color=auto"
|
2018-11-13 18:26:44 +00:00
|
|
|
alias egrep="egrep --color=auto"
|
|
|
|
alias fgrep="fgrep --color=auto"
|
2018-10-07 06:27:05 +00:00
|
|
|
|
|
|
|
# override for Debian's new idiotic quoting style in ls
|
|
|
|
export QUOTING_STYLE=literal
|
|
|
|
|
|
|
|
# override executable directories weird blue on green color scheme
|
2018-11-13 18:26:44 +00:00
|
|
|
if which dircolors 2>&1 /dev/null; then
|
|
|
|
eval "$(dircolors)"
|
|
|
|
export LS_COLORS="${LS_COLORS}:ow=1;4;33"
|
|
|
|
fi
|