forked from dcuddeback/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bash_profile
More file actions
78 lines (62 loc) · 2.45 KB
/
.bash_profile
File metadata and controls
78 lines (62 loc) · 2.45 KB
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
69
70
71
72
73
74
75
76
77
78
source ~/.bashrc
# bash completion from Homebrew
if [ -d "/usr/local/etc/bash_completion.d" ]; then
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-flow-completion.bash" ]; then source "/usr/local/etc/bash_completion.d/git-flow-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 [ -f "/usr/local/etc/bash_completion.d/cargo" ]; then source "/usr/local/etc/bash_completion.d/cargo"; fi
fi
# bash completion for SSH
if [ $(uname) == "Darwin" ]; then
if [ -f $HOME/.ssh/config ]; then
complete -o default -o nospace -W "$(/usr/bin/env ruby -ne 'puts $_.split(/[,\s]+/)[1..-1].reject{|host| host.match(/\*|\?/)} if $_.match(/^\s*Host\s+/);' < $HOME/.ssh/config)" scp sftp ssh
fi
fi
RED='\[\033[1;31m\]'
GREEN='\[\033[1;32m\]'
YELLOW='\[\033[1;33m\]'
BLUE='\[\033[1;34m\]'
DEFAULT='\[\033[0m\]'
function __conditional_git_ps1 {
(command -v __git_ps1 > /dev/null) && __git_ps1
}
export PS1="${GREEN}\h${DEFAULT}:${BLUE}\W${YELLOW}\$(__conditional_git_ps1)${DEFAULT} \$ "
export CLICOLOR=1
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
export EDITOR=vim
export PAGER=less
alias grep='grep --color=auto'
alias irc='screen -d -RR -S irc weechat-curses && clear'
if [ "$(uname)" == "Linux" ]
then
alias open='gnome-open'
alias pbcopy='xsel --clipboard --input'
alias pbpaste='xsel --clipboard --output'
fi
# JAVA_HOME for OSX
if [ -d /System/Library/Frameworks/JavaVM.framework/Home/ ]; then
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home/
fi
# JAVA_HOME for Linux
if [ -d /usr/lib/jvm/java-6-openjdk/ ]; then
export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/
fi
# Ruby env
if command -v rbenv > /dev/null 2>&1 ; then
if [ -z "$__rbenv_init" ]; then
eval "$(rbenv init -)"
export __rbenv_init=1
fi
fi
# Make use of keychain (if installed) to manage ssh-agent and gpg-agent
if command -v keychain > /dev/null 2>&1 ; then
eval `keychain --eval --clear`
fi
# load settings specific to the local machine
if [ -f ~/.bash_local ]; then
source ~/.bash_local
fi
export PATH
export PATH="$HOME/.cargo/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
. "$HOME/.local/bin/env"