-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.bash_aliases
49 lines (38 loc) · 1.29 KB
/
.bash_aliases
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
# .bash_aliases
# Bash Functions
function git-root
{
git rev-parse --is-inside-work-tree 1> /dev/null || return
while :
do
cd "$(git rev-parse --show-toplevel)"
cd ..
git rev-parse --is-inside-work-tree &> /dev/null || break
done
cd - &> /dev/null
}
# Everyone need some color in their life
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export TERM=xterm-color
# Add some easy shortcuts for formatted directory listings
if command -v man > /dev/null && man ls | grep -q TERM; then
export LS_OPTIONS="--color -l"
alias ll='ls -lF'
alias la='ls -alF'
alias ls='ls -F'
else
alias ll='ls --color=auto -lF'
alias la='ls --color=auto -alF'
alias ls='ls --color=auto -F'
fi
alias kp='ps auxwww'
# Strip source control, useful for ensuring deployed code is production only
alias cleansvn='find . -name ".svn" -exec rm -rf {} \;'
alias cleangit='find . -name ".git" -exec rm -rf {} \;'
# git helper aliases. they change the cwd so they need to be outside of .gitconfig
alias git-top='cd "$(git rev-parse --show-toplevel)"'
# OS X has no `md5sum`, so use `md5` as a fallback
command -v md5sum > /dev/null || alias md5sum="md5"
# OS X has no `sha1sum`, so use `shasum` as a fallback
command -v sha1sum > /dev/null || alias sha1sum="shasum"