forked from ftf/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bashrc.symlink
68 lines (56 loc) · 2 KB
/
bashrc.symlink
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Default editor
export EDITOR=vim
# Save each command to .bash_history immediately, rather than at end of each session
# This works around the "last bash session clobbers any previous history" behavior.
PROMPT_COMMAND='history -a'
# git branch for prompt
if [ -f "$(brew --prefix)/bash_completion.d/git-prompt.sh" ]; then
. "$(brew --prefix)/bash_completion.d/git-prompt.sh"
elif [ -f /usr/share/git-core/contrib/completion/git-prompt.sh ]; then
. /usr/share/git-core/contrib/completion/git-prompt.sh
fi
if [ "\$(type -t __git_ps1)" ]; then # if we're in a Git repo, show current branch
BRANCH="\$(__git_ps1 '[ %s ] ')"
fi
if [ -f "$(brew --prefix)/etc/bash_completion" ]; then
. "$(brew --prefix)/etc/bash_completion"
elif [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
fi
export GREP_OPTIONS='--color=auto'
export GREP_COLOR='1;31'
export CLICOLOR=1
export PATH=~/bin:/usr/local/sbin:/usr/local/bin:/usr/local/opt/go/libexec/bin:$PATH
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
export HISTCONTROL="erasedups"
export HISTSIZE=10000
export HISTFILESIZE=10000
shopt -s histappend
shopt -s cdspell
shopt -s cmdhist
# gentoo prompt + git branch + load
export PS1="\[\033[01;32m\]\u@\h\[\033[00;34m\] \w \[\033[0;31m\]${BRANCH}\[\033[00;34m\]\n\$\[\033[00m\] "
# public repro bash config files
if [ "$(find $HOME/.dotfiles/bash/*.bash | wc -l 2> /dev/null)" != 0 ]; then
for config_file in ~/.dotfiles/bash/*.bash; do
source "$config_file"
done
fi
# private repro bash config files
if [ -n "$(shopt -s nullglob; echo ~/.dotfiles/privatedots/bash/*.bash)" ]; then
for config_file in ~/.dotfiles/privatedots/bash/*.bash; do
source "$config_file"
done
fi
# AWS CLI bash completion
complete -C aws_completer aws
# Packer cache dir
PACKER_CACHE_DIR=$HOME/tmp/packer_cache
# Set GOPATH
export GOPATH=$HOME/Code/go
export PATH=$PATH:$GOPATH/bin
PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# https://github.com/github/hub
eval "$(hub alias -s)"