From 8d939bd895b8770893fbabe2473e3221254c6be2 Mon Sep 17 00:00:00 2001 From: Samir Benmendil Date: Mon, 13 Apr 2015 15:47:02 +0100 Subject: [PATCH] zsh: fix zsh_stats --- zsh/functions/zsh_stats | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/functions/zsh_stats b/zsh/functions/zsh_stats index 9b5284f..dbf33a0 100644 --- a/zsh/functions/zsh_stats +++ b/zsh/functions/zsh_stats @@ -1,3 +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 + fc -l 1 | awk '{a[$2]++; count++}END{for(i in a)printf "%3d %.2f%% %s\n", a[i], a[i]/count*100, i}' | sort -rn | head -20 } -- 2.48.1