From a4471665bac5618266c24effdad71d8f685dc7e0 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Mon, 31 Aug 2009 15:00:15 -0700 Subject: [PATCH] Adding zsh_stats function to show you which commands you run the most. --- functions.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions.zsh b/functions.zsh index dcabed9..1f2a202 100644 --- a/functions.zsh +++ b/functions.zsh @@ -22,4 +22,8 @@ function preexec { function remote_console() { /usr/bin/env ssh $1 "( cd $2 && ruby script/console production )" +} + +function zsh_stats() { + history | awk '{print $2}' | sort | uniq -c | sort -rn | head } \ No newline at end of file