]> git.rmz.io Git - dotfiles.git/blobdiff - zsh/functions/zsh_stats
remove oh-my-zsh
[dotfiles.git] / zsh / functions / zsh_stats
diff --git a/zsh/functions/zsh_stats b/zsh/functions/zsh_stats
new file mode 100644 (file)
index 0000000..9b5284f
--- /dev/null
@@ -0,0 +1,3 @@
+function zsh_stats() {
+  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
+}