63 lines
1.5 KiB
Bash
63 lines
1.5 KiB
Bash
if [ -f /etc/bash_completion ]; then
|
|
source /etc/bash_completion
|
|
fi
|
|
|
|
awsAutocomplete=$(which aws_completer)
|
|
if [ -n "${awsAutocomplete}" ]; then
|
|
complete -C "${awsAutocomplete}" aws
|
|
fi
|
|
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
|
|
if type brew 2&>/dev/null; then
|
|
for completion_file in $(brew --prefix)/etc/bash_completion.d/*; do
|
|
source "$completion_file"
|
|
done
|
|
fi
|
|
|
|
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() {
|
|
PS1="$GREEN\u@\h$RESET:$BLUE\w$MAGENTA$(__git_ps1 " (%s)")$RESET "
|
|
}
|
|
|
|
if [ "$(type -t __git_ps1)" = "function" ]; then
|
|
PROMPT_COMMAND=set_bash_prompt
|
|
else
|
|
PS1="$GREEN\u@\h$RESET:$BLUE\w$RESET "
|
|
fi
|
|
|
|
colorOption="--color=auto"
|
|
if [ "$(uname)" = "Darwin" ]; then
|
|
colorOption=-G
|
|
fi
|
|
|
|
alias ls="ls ${colorOption}"
|
|
alias grep="grep --color=auto"
|
|
alias egrep="egrep --color=auto"
|
|
alias fgrep="fgrep --color=auto"
|
|
|
|
# override for Debian's new idiotic quoting style in ls
|
|
export QUOTING_STYLE=literal
|
|
|
|
# override executable directories weird blue on green color scheme
|
|
if which dircolors > /dev/null; then
|
|
eval "$(dircolors)"
|
|
export LS_COLORS="${LS_COLORS}:ow=1;4;33"
|
|
fi
|