Joined May 2011
·

Leandro López

Citrusbyte
·
Buenos Aires, Argentina
·
·
·

I think you're missing a \n after rate "\r", but other than that, this is pretty cool!

Avoid PasswordAuthentication yes as much as possible

I've adapted to read my ~/.bash_history instead, though it's pretty much the same script:

grep ^git ~/.bash_history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl |  head -n10

My results are:

 1  18  15.2542%   co
 2  15  12.7119%   st
 3  14  11.8644%   ci
 4  12  10.1695%   push
 5  9   7.62712%   s
 6  7   5.9322%    di
 7  7   5.9322%    add
 8  5   4.23729%   rebase
 9  5   4.23729%   l
10  5   4.23729%   fetch
  • co: checkout
  • st: status
  • ci: commit
  • s: status -sb
  • di: diff
  • l: git --no-pager log -1 --name-status

@passcod there's no need to do cat ~/.histfile | grep git, it's much better to do grep git ~/.histfile.

Achievements
126 Karma
0 Total ProTip Views