summaryrefslogtreecommitdiff
path: root/lib/functions.zsh
diff options
context:
space:
mode:
authorCHH <whocareu2008@gmail.com>2012-11-14 19:09:13 +0800
committerCHH <whocareu2008@gmail.com>2012-11-14 19:09:13 +0800
commit5b2ca3875a15bbae4f064cb98935461df2e93e15 (patch)
treeaf60ffec62602ba46dad60a5f378e5c413a36d07 /lib/functions.zsh
parentc2ae9e09ca1f33ff1e13e629a0b2e6bdd19f83a9 (diff)
downloadzsh-5b2ca3875a15bbae4f064cb98935461df2e93e15.tar.gz
zsh-5b2ca3875a15bbae4f064cb98935461df2e93e15.tar.bz2
zsh-5b2ca3875a15bbae4f064cb98935461df2e93e15.zip
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
Diffstat (limited to 'lib/functions.zsh')
-rw-r--r--lib/functions.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/functions.zsh b/lib/functions.zsh
index d2dcadd0c..63ab755cf 100644
--- a/lib/functions.zsh
+++ b/lib/functions.zsh
@@ -1,5 +1,5 @@
function zsh_stats() {
- history | awk '{print $2}' | sort | uniq -c | sort -rn | head
+ 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
}
function uninstall_oh_my_zsh() {