5b2ca3875a15bbae4f064cb98935461df2e93e15

Author
CHH <whocareu2008@gmail.com>
Committer
CHH <whocareu2008@gmail.com>
Date

Message

Improved statistics functions, effect:

 1  1124  24.6006%    c
 2  985   21.5583%    git
 3  343   7.50711%    rails
 4  328   7.17881%    cd
 5  314   6.8724%     rspec
 6  257   5.62486%    la
 7  197   4.31167%    rake
 8  154   3.37054%    s
 9  109   2.38564%    ..
10  95    2.07923%    rvm
11  68    1.48829%    guard
12  36    0.787919%   bundle
13  29    0.634712%   ssh
14  28    0.612826%   pry
15  27    0.590939%   open
16  26    0.569052%   middleman
17  26    0.569052%   gem
18  24    0.525279%   rm
19  24    0.525279%   heroku
20  23    0.503392%   nvm

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() {