From 81a52a5d7d5d3a615b3e01822abd9a85c8048f35 Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Sun, 9 Dec 2018 20:08:13 -0500 Subject: [PATCH] [history] Use fc -l instead of history `history` is equivalent to `fc -l`, and `fc` is the actual Zsh builtin. Add the `-n` flag to suppress event numbers when listing. --- modules/history/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/history/init.zsh b/modules/history/init.zsh index 965c440..80e6a40 100644 --- a/modules/history/init.zsh +++ b/modules/history/init.zsh @@ -37,4 +37,4 @@ setopt HIST_VERIFY # Lists the ten most used commands. -alias history-stat="history 0 | awk '{print \$2}' | sort | uniq -c | sort -n -r | head" +alias history-stat="fc -ln 0 | awk '{print \$1}' | sort | uniq -c | sort -nr | head"