From 80c134e8bbe76c952cfeff4e26ff3c588d8b39f9 Mon Sep 17 00:00:00 2001
From: Chris <chris@codingallnight.com>
Date: Tue, 19 Dec 2017 15:37:07 -0800
Subject: [PATCH] Update hist alias in bash_aliases

---
 bash_aliases | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bash_aliases b/bash_aliases
index 6a00888..9529f08 100644
--- a/bash_aliases
+++ b/bash_aliases
@@ -67,7 +67,7 @@ function count {
 # Show a histogram output of commands in history
 alias _hist='echo "hist(): Show a histogram output of commands in history"'
 function hist {
-    history | awk '{print $2}' | sort -n | uniq -c | sort -n | tail
+    history | awk '{if ($2 == "sudo") {print $2,$3} else {print $2}}' | sort -n | uniq -c | sort -nr | head -n20
 }
 
 # Make a directory, then cd into it
-- 
GitLab