From 313d2a863512f516c49e0c4436356b629f609c23 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 4 May 2025 15:04:42 +0300 Subject: [PATCH] Show number of entries in category --- zk.zsh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/zk.zsh b/zk.zsh index afe5680..e331c55 100755 --- a/zk.zsh +++ b/zk.zsh @@ -35,7 +35,10 @@ for p (**(.)) { sizes[$p]=${size[1]} } typeset -A cats -for p (**(/)) cats[$p]=1 +for p (**(/)) { + local files=($p/*(N)) + cats[$p]=$#files +} zmodload zsh/mapfile zmodload -F zsh/files b:zf_mkdir @@ -183,12 +186,12 @@ genIndex() { } print "" if [[ $_cats ]]; then - print "
Subdirectories: