-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbashrc
executable file
·47 lines (38 loc) · 1.12 KB
/
bashrc
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
defaults write com.apple.finder AppleShowAllFiles TRUE
source ~/.bash_aliases
if [ "$PS1" ]; then
red='\[\e[31m\]'
green='\[\e[32m\]'
yellow='\[\e[33m\]'
cyan='\[\e[36m\]'
grey='\[\e[0;37m\]'
reset_color='\[\e[0m\]'
set_title='\[\e]0;\]$(basename "$PWD")\[\007\]'
prompt="$green$"
if test `id -un` = root; then
prompt="$red#"
fi
function prompt-gem-path() {
ruby_version=`echo $GEM_HOME | sed -n /@/p | sed -e 's/\/.*\///'`
if test -n "$ruby_version"; then
echo "$ruby_version"
fi
}
function prompt-git-user() {
git_user=`git config --get user.name`
if test -n "$git_user" && test -n "`prompt-git-branch`"; then
echo " '$git_user'"
fi
}
function prompt-git-branch() {
git_branch=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/^* //'`
if test -n "$git_branch"; then
echo " [$git_branch]"
fi
}
PS1="${set_title}
${green}(\t) ${yellow}\w${grey}\$(prompt-git-branch)${cyan}\$(prompt-git-user) ${yellow}\$(prompt-gem-path)
${prompt} ${reset_color}"
fi
source /opt/boxen/env.sh
export DYLD_FALLBACK_LIBRARY_PATH=/usr/lib:$DYLD_FALLBACK_LIBRARY_PATH