X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/b55d69396b587288c7e654035190d9e62fa70b71..refs/heads/lazyvim:/zsh/functions/zsh_stats 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 }