Upload
This commit is contained in:
commit
28506bf4dd
4
bash/.bashrc
Normal file
4
bash/.bashrc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
parse_git_branch() {
|
||||||
|
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
|
||||||
|
}
|
||||||
|
export PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[\033[31m\]\$(parse_git_branch)\[\033[00m\]$ "
|
4
bash/git-stat
Normal file
4
bash/git-stat
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/bash
|
||||||
|
git log --pretty=format:==%an --numstat | \
|
||||||
|
sed -r '/==.*/{s/^==//;h;D};/^$/D;s/-/0/g;s/\t[^\t]+$//;G;s/(.*)\n(.*)/\2\t\1/' \
|
||||||
|
| awk -F '\t' '{add[$1]+=$2;del[$1]+=$3} END {for (i in add) {print i,add[i],del[i]}}'
|
Loading…
Reference in New Issue
Block a user