Browse Source

Adding zsh_stats function to show you which commands you run the most.

Robby Russell 15 years ago
parent
commit
6fd7da65a3
1 changed files with 4 additions and 0 deletions
  1. 4 0
      functions.zsh

+ 4 - 0
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
 }