-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_awesome
51 lines (45 loc) · 1.32 KB
/
.bash_awesome
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
#puts port in path
export PATH=$PATH:/opt/local/bin
export MANPATH=$MANPATH:/opt/local/share/man
export INFOPATH=$INFOPATH:/opt/local/share/info
export EDITOR=vim
#shell colors
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagacad
#tab completion
if [ -f /opt/local/etc/bash_completion ]; then
. /opt/local/etc/bash_completion
fi
complete -C ~/get-awesome/rake_completion -o default rake
alias gpp="git pull && git push"
alias grep="grep --color"
alias pair="~/get-awesome/pair $@"
#remove all gems
function uninstall_all_gems {
INSTALLED_GEMS=`gem list --no-versions`;
for gem_name in $INSTALLED_GEMS; do
sudo gem uninstall --a --ignore-dependencies $gem_name;
done
}
# search for a running process
function show {
ps -ax | grep -v grep | grep "$1";
}
#git branch display
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local YELLOW="\[\033[0;33m\]"
local WHITE="\[\033[1;37m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
local GRAY="\[\033[1;30m\]"
local RESET="\[\033[0m\]"
export PS1="$RESET\u@\h: \w$GREEN\$(parse_git_branch)$RESET$ "
}
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
proml