-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.profile
More file actions
129 lines (112 loc) · 3.21 KB
/
.profile
File metadata and controls
129 lines (112 loc) · 3.21 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
export LANG="en_US.UTF-8"
alias ls='ls -kGF'
alias be='bundle exec'
alias gp="git push origin HEAD --follow-tags"
alias gpf="git push --force-with-lease origin HEAD"
alias gg="git pull --rebase"
alias gs="git status -sb"
alias gms="git merge-status"
alias ga="git add"
alias gc="git commit"
alias gac="git commit -a"
alias grep="$(which grep) --color=auto -E"
alias ngrep="grep -n"
alias duh='du -hd1 | gsort -h'
if [ -d /Applications/MacVim.app ]; then
alias vim='/Applications/MacVim.app/Contents/MacOS/Vim'
alias vi='/Applications/MacVim.app/Contents/MacOS/Vim'
fi
# Now using brew
export PATH=$HOME/bin:/usr/local/bin:$PATH
export PATH="$HOME/.rbenv/bin:$PATH"
export MANPATH=/usr/local/share/man:$MANPATH
export CDPATH=".:~:~/Sites:~/Sources"
if [ -e "/opt/homebrew/bin/brew" ]
then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
if [ "`which brew`" ]
then
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
elif [ -f $(brew --prefix)/etc/profile.d/bash_completion.sh ]; then
. $(brew --prefix)/etc/profile.d/bash_completion.sh
fi
fi
macos_devtools_prefix="/Library/Developer/CommandLineTools"
macos_git_comp="${macos_devtools_prefix}/usr/share/git-core/git-completion.bash"
[ -r "${macos_git_comp}" ] && source "${macos_git_comp}"
function current_ruby() {
if [ "`which rbenv`" ]
then
version=$(rbenv version-name)
else
version="system (rbenv not set up)"
fi
echo -n "Ruby: ${version}"
}
function current_node() {
if [ "`type -t nvm`" ]
then
version=$(nvm current)
elif [ "`which node`" ]
then
version="system (nvm not set up)"
else
version="none"
fi
echo -n "Node: ${version}"
}
function current_branch() {
git branch &>/dev/null || return
echo -n " ($(git branch --show-current))"
}
function prompt() {
ruby_node='$(current_ruby)\011$(current_node)'
lf='\012'
red='\[\033[01;31m\]'
green='\[\033[01;32m\]'
blue='\[\033[01;34m\]'
uncolor='\[\033[00m\]'
user_host_dir_branch="${green}\u@\h ${blue}\W${red}\$(current_branch)${uncolor}"
echo "${ruby_node}${lf}[${user_host_dir_branch}]\$ "
}
export PS1="$(prompt)"
export COPYFILE_DISABLE
export COPY_EXTENDED_ATTRIBUTES_DISABLE
$(which rbenv >/dev/null 2>&1) && eval "$(rbenv init -)"
shopt -s histappend
export LC_CTYPE=en_US.UTF-8
export PYTHONIOENCODING=UTF-8
export EDITOR=vim
export NVM_DIR=~/.nvm
export NVM_DIR="${HOME}/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
if [ -d ${HOME}/perl5 ]
then
export PATH="${HOME}/perl5/bin${PATH:+:${PATH}}"
export PERL5LIB="${HOME}/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"
export PERL_LOCAL_LIB_ROOT="${HOME}/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"
export PERL_MB_OPT="--install_base \"${HOME}/perl5\""
export PERL_MM_OPT="INSTALL_BASE=${HOME}/perl5"
fi
function force_gpg_auth() {
export SSH_AUTH_SOCK=$(gpgconf --list-dir agent-ssh-socket)
}
if [ -d "${HOME}/.gnupg" ] && [ -z "${SSH_AUTH_SOCK}" ]
then
force_gpg_auth
fi
if [ "$DISPLAY" ] && `which gvim 2>&1 >/dev/null`
then
export VISUAL="gvim -f"
export BUNDLER_EDITOR="gvim"
elif [ "`uname -s`" = "Darwin" ] && `type mvim 2>&1 >/dev/null`
then
export VISUAL="mvim -f"
export BUNDLER_EDITOR="mvim"
fi
if [ "`which direnv`" ]
then
eval "$(direnv hook bash)"
fi