forked from jessarcher/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bash_profile
34 lines (27 loc) · 906 Bytes
/
bash_profile
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
#
# ~/.bash_profile
#
[[ -f ~/.bashrc ]] && . ~/.bashrc
#if [[ -z $(pidof ssh-agent) && -z $(pidof gpg-agent) ]]; then
if keychain > /dev/null 2>&1; then
eval $(keychain --eval --quiet --agents ssh,gpg id_rsa)
fi
################################################################################
# Completion
################################################################################
# Brew bash completion
if hash brew 2>/dev/null && [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
# Bash completion
if [ -f /etc/bash_completion ]; then
source /etc/bash_completion
fi
# Beets bash completion
if hash beet 2>/dev/null; then
eval "$(beet completion)"
fi
# ssh/scp/sftp completion for known hosts
if [[ -e ~/.ssh/known_hosts ]]; then
complete -o default -W "$(cat ~/.ssh/known_hosts | sed 's/[, ].*//' | sort | uniq )" ssh scp sftp
fi