From a0e9cb9f0baba482833c12afc2d9d525b176ea49 Mon Sep 17 00:00:00 2001 From: Morgan Wattiez Date: Thu, 25 Jul 2019 09:03:39 +0200 Subject: [PATCH] \t is not recognized, TAB is --- dot_zsh_functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dot_zsh_functions b/dot_zsh_functions index 7b318a9..aeecc6f 100644 --- a/dot_zsh_functions +++ b/dot_zsh_functions @@ -62,5 +62,5 @@ function top_commands() { history 1 | cat | 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 -n50 } function top_commands_full() { - history 1 | cat | sed 's/^[0-9 \t]*//g' | awk '{CMD[$0]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "%\t" a; }' | sort -nr | nl | head -n50 + history 1 | cat | sed 's/^[0-9 TAB]*//g' | awk '{CMD[$0]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "%\t" a; }' | sort -nr | nl | head -n50 }