802c2df7ba56e08b1befff65b31a0e2545f948d6

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #1406 from chinghanho/master

Improved statistics functions

Diff

 1diff --git a/lib/functions.zsh b/lib/functions.zsh
 2index d2dcadd0cb4d7235c8876556eb863140c315df12..63ab755cf72b1094975ef017cd71727c756e1943 100644
 3--- a/lib/functions.zsh
 4+++ b/lib/functions.zsh
 5@@ -1,5 +1,5 @@
 6 function zsh_stats() {
 7-  history | awk '{print $2}' | sort | uniq -c | sort -rn | head
 8+  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 -n20
 9 }
10 
11 function uninstall_oh_my_zsh() {