From 64a46424220ec01503a5b26692405febf401c396 Mon Sep 17 00:00:00 2001 From: rdsq Date: Mon, 16 Feb 2026 18:30:13 +0200 Subject: [PATCH] feat(zsh_stats): allow custom number of results shown --- lib/functions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index 330b0e3e9..2291c29e3 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -1,7 +1,7 @@ function zsh_stats() { fc -l 1 \ | awk '{ CMD[$2]++; count++; } END { for (a in CMD) print CMD[a] " " CMD[a]*100/count "% " a }' \ - | grep -v "./" | sort -nr | head -n 20 | column -c3 -s " " -t | nl + | grep -v "./" | sort -nr | head -n "${1:-20}" | column -c3 -s " " -t | nl } function uninstall_oh_my_zsh() {