-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbash_functions
46 lines (38 loc) · 873 Bytes
/
bash_functions
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
# Process Control
function psa { ps aux $@; }
# Find
function ff { find . -name $@ -print; }
# Status
function st {
if [ -d ".svn" ]; then
svn status
else
git status
fi
}
# Ruby || JRuby
function cdgem {
cd `gem env gemdir`/gems
cd `ls | grep $1 | sort | tail -1`
}
function gemdoc {
GEMDIR=`gem env gemdir`/doc
open $GEMDIR/`ls $GEMDIR | grep $1 | sort | tail -1`/rdoc/index.html
}
function mategem {
GEMDIR=`gem env gemdir`/gems
mate $GEMDIR/`ls $GEMDIR | grep $1 | sort | tail -1`
}
function repoman_update {
for file in ~/scm/repoman/*; do
if [ -d $file ]; then
cd $file && git pull
fi
done
}
function list_authors {
find . -type d -depth 1 | grep -v '.git' | xargs -I {} git --git-dir {}/.git log --oneline --pretty | grep Author | sort | uniq
}
pman () {
man -t "${1}" | open -f -a /Applications/Preview.app
}