forked from sontek/homies
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_bashrc
114 lines (87 loc) · 3.2 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
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
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
#osx color terminal
export CLICOLOR=1
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
# set variable identifying the chroot you work in (used in the prompt below)
if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
PS1='\[\e]0;\u@\h: \w\a\]\[\033[01;30m\]\w\[\033[0;33m\]\n${debian_chroot:+($debian_chroot)}\[\033[33m\]\u\[\033[1;33m\]@\[\033[0;33m\]\h\[\033[00m\]\$'
# If this is an xterm set the title to user@host:dir
case "$TERM" in
xterm*|rxvt*)
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
;;
*)
;;
esac
# Alias definitions.
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
. /etc/bash_completion
fi
[ -f ~/.git-completion.bash ] && . ~/.git-completion.bash
venwrap=`type -P virtualenvwrapper.sh`
if [ "$venwrap" != "" ]; then
source $venwrap
fi
PYTHONSTARTUP=~/.pythonrc.py
export PYTHONSTARTUP
parse_git_branch ()
{
git branch 2> /dev/null | grep '*' | sed 's#*\ \(.*\)#(git::\1)#'
}
parse_svn_branch() {
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -F / '{print "(svn::"$1 "/" $2 ")"}'
}
parse_svn_url() {
svn info 2>/dev/null | sed -ne 's#^URL: ##p'
}
parse_svn_repository_root() {
svn info 2>/dev/null | sed -ne 's#^Repository Root: ##p'
}
export EDITOR=/usr/local/bin/vim
# SET LS_COLORS
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
export LC_ALL=en_US.UTF-8
# Add git and svn branch names
export SUDO_PS1="$PS1"
export PS1="$PS1\$(parse_git_branch)\$(parse_svn_branch) "
#python
#PATH=$PATH:/usr/local/share/python:/usr/local/share/npm/bin
PATH=$PATH:/usr/local/share/npm/bin
#ruby
PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for scripting
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*$
if brew list | grep coreutils > /dev/null ; then
PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
MANPATH="$(brew --prefix coreutils)/libexec/gnuman:$MANPATH"
alias ls='ls -F --show-control-chars --color=auto'
eval `gdircolors -b $HOME/.dir_colors`
fi
#[ -f /opt/boxen/env.sh ] && source /opt/boxen/env.sh
##export THEOS=/opt/theos
#PERL
#export PERL5LIB="$(xcode-select --print-path)/Library/Perl/5.12/darwin-thread-multi-2level"
# Android
export ANDROID_HOME=/usr/local/opt/android-sdk
#RBENV
export RBENV_ROOT=/usr/local/var/rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi