-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.bash_sources
49 lines (38 loc) · 1.09 KB
/
.bash_sources
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
#!/usr/bin/env bash
# Rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
if command -v rbenv > /dev/null; then
eval "$(rbenv init -)"
fi
# Brew Python
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
# gpg2 & its gpg-agent
export PATH="/usr/local/opt/gpg-agent/bin:$PATH"
# Alias-plugins
for plugin in ~/.ext_aliases/*; do
[ -r "$plugin" ] && [ -f "$plugin" ] && source "$plugin"
done
unset plugin
############################################################
# COMPLETIONS
# Brew bash completion
if [ -f /usr/local/share/bash-completion/bash_completion ]; then
. /usr/local/share/bash-completion/bash_completion
fi
# Git
. ~/.git-completion.bash
# Rbenv & bundler
if command -v bundler > /dev/null; then
eval "$(complete_bundle_bash_command init)"
fi
# Pip
_pip_completion() {
mapfile -t COMPREPLY < <(COMP_WORDS="${COMP_WORDS[*]}" \
COMP_CWORD=$COMP_CWORD \
PIP_AUTO_COMPLETE=1 $1)
}
complete -o default -F _pip_completion pip
# Use brew command-not-found
if brew command command-not-found-init > /dev/null; then
eval "$(brew command-not-found-init)"
fi